isah_voodoo Posted July 16, 2019 Share Posted July 16, 2019 Hello again I come with another vex question. This time I am trying to figure out the function getbbox and store it into an attribute to see what the values are actually doing,.... The help cards states: Sets two vectors to the minimum and maximum corners of the bounding box for the geometry. void getbbox(vector &min, vector &max) So I am trying to follow this exactly. vector min; vector max; getbbox(min,max); @P.x *= (@P.y/max.y); Now, I found this simple pieces of code on the forums somewhere and it works great. However, I am trying to store the getbbox into my own attribute so I can actually see the values but when I try, it gives me an error. This is what im doing: vector min; vector max; v@myBound= getbbox(min,max); @P.x *= (@P.y/max.y); What exactly am I doing wrong here? Why does the getbbox function not let me store its values into an attribute? Quote Link to comment Share on other sites More sharing options...
anim Posted July 16, 2019 Share Posted July 16, 2019 vector min; vector max; getbbox(min,max); v@bbox_min = min; v@bbox_max = max; //or as array containing both v[]@bbox = array(min, max); 2 Quote Link to comment Share on other sites More sharing options...
ikoon Posted July 16, 2019 Share Posted July 16, 2019 Hi Matt, according to the docs, void getbbox(vector &min, vector &max) is deprecated. We should use three arguments, first is the geometry input (integer number or "op:" string reference). getbbox (0, v@min, v@max); This one line is also what you asked for. It stores the bounding box into two vector attributes. Quote Link to comment Share on other sites More sharing options...
isah_voodoo Posted July 17, 2019 Author Share Posted July 17, 2019 @anim @ikoon Thanks you. This makes perfect sense now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.