Jump to content
Digistruct

getbbox_size - what input does it expect?

Recommended Posts

Hey guys, 

I'm trying to learn VEX a bit more and for an experiment I wanted to do I want to get the bounding box size of the first input in my wrangle node. 
But I just get an error and don't understand what I've done wrong - any and all help in appreciated! 

vector getpointbbox_size(0, @ptnum);

Thanks,
Jack

Share this post


Link to post
Share on other sites
vector size;
size = getpointbbox_size(0);

It expects an input Geometry and outputs the size of the entire thing. So it doesn't need any other argument.

note, that "getpointbbox_size" only looks at the points. you can use "getbbox_size" to check for everything in your input geo. From the help:

"getpointbbox_size is the same as getbbox_size except it only computes the bounding box of the points. So if a primitive has extents that don’t have points (for example, the boundary of a primitive sphere), they will not be included in the box."

Share this post


Link to post
Share on other sites

Also note that the "0" as the argument, refers to the input number, you can also use 1,2,3 to access the other input nodes (or even -1, -2, etc if you use spare inputs)

Edited by acey195
fixed input index numbers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×