Jump to content

bbox vector placeholder question


logix1390

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

 

Link to comment
Share on other sites

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
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...