Jump to content

vertexindex and vertexpoint


Recommended Posts

Hi,,,

I'm facing some troubles understanding some vex functions , many HIP files include wrangles like

int vt0 = vertexindex(0,@primnum,0);
int vt1 = vertexindex(0,@primnum,1);

int pt0 = vertexpoint(0,vt0);
int pt1 = vertexpoint(0,vt1);

and I don't understand what the two functions return exactly ?

Link to comment
Share on other sites

pointvertex() will also give you the (usually first) vertex connected to a point (returns -1 if it is an isolated point). you could then use vertexnext() and vertexprev() to get more vertices connected to the same point.

pointvertices() will give you an int array of all the vertices connected to a point.

I generally always have this open when writing vex: https://www.sidefx.com/docs/houdini15.0/vex/functions/

the simple way to remember how these guys work, is the [first part of the name is the input] [second part of the name is the output]

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...