Skip to content

Get Normal vector / the face of a mesh containing a point #45

Answered by jimy-byerley
Yarkane asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Yarkane !
Unfortunately, there is no such thing out of the box in madcad.

The problem of getting the index of a face intersecting a ray (from the view point to the clicked direction for instance) is a common problem, typically in rendering programs featuring ray tracing, or in collision detection. But those are not the main purpose of madcad (there is nothing wrong in using madcad together with such functions, but that's not a target for madcad).

In the madcad rendering pipeline, the problem is addressed only for the purpose of mouse-selection in the GUI, and implemented in a way that only works for GUI interactions: every frame rendered in the window also renders an identification

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Yarkane
Comment options

Answer selected by Yarkane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants