Jump to content
Sign in to follow this  
logix1390

bbox vector placeholder question

Recommended Posts

Hello,

I recently stumbled upon some code that had something like this:

vector min, max;
getbbox(min,max);

So is vector min, max is basically creating two empty placeholder vectors: (0,0,0) and (0,0,0) ??

So when I say getbbox(min,max); ..it really means: getbbox(0,0,0), (0,0,0));  ????

I know the getbbox is supposed to set two vectors for the min and max corners of the input geometry, but how does it calculate it if I am just giving it two empty placeholder vectors (0,0,0)...how can I see this in an attribute in the geometry spreadsheet so I know what the placeholders are really doing ?

Sorry for the silly question...Any help would be greatly appreciated.

Thanks

 

Share this post


Link to post
Share on other sites
Posted (edited)

you're missing the geometry path or input

the correct syntax should be:
vector bmin,bmax; //creates 2 empty vectors
getbbox(0,bmin,bmax); //get bounds and stores the values in the 2 vectors variables (the 0 is for first input)

if you want to see the values in the geo spreadsheets, you can export attributes like this:
v@bmin = bmin;
v@bmax = bmax;


note that min is a vex function so it's confusing to name a variable that way.
hope that helps



 

Edited by bunker

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
Sign in to follow this  

×