VEX: point normal

   8465   3   0
User Avatar
Member
97 posts
Joined: May 2015
Offline
Is there a function that set or gets the points number normal direction?Or a function that gets the first point from a direction line from the point given direction.
Edited by Shadowjonny - March 14, 2019 01:52:02
User Avatar
Member
11 posts
Joined: Feb. 2018
Offline
Do you mean something like this:

@N = {0,0,1};

in a wrangle will set the point normals down the Z axis
User Avatar
Member
97 posts
Joined: May 2015
Offline
jordanhalsey
@N = {0,0,1};

yes, but is there a function that get the first point it hit based on the point normal direction.
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
There's the intersect() [www.sidefx.com] function, but probably you need the intersectall() [www.sidefx.com] function instead, because, if I'm not mistaken, when you throw a ray from an existing point, first intersection will always be that very same point. So you likely want to collect all the intersections with the intersectall() and get the second one.


You can use also Ray Sop which comes with some useful features and very handy for rapid debugging, but probably slower than vex based implementation with intersect().
Edited by Andr - March 15, 2019 07:35:39
  • Quick Links