We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Finding bounds of imported OBJ model
Page Index Toggle Pages: 1
Finding bounds of imported OBJ model (Read 644 times)
Finding bounds of imported OBJ model
Feb 24th, 2006, 8:53pm
 
I'm using Tatsuya Saito's OBJ Importer library.  I'd like to find out the extents of the model programmatically.  In other words, I'd have no prior knowledge of what model would be loaded.  Once I have that information, I'd like to find the outline of the model at any arbitrary depth, in order to generate a cross-section of the model.  Does anyone have any advice about how to access the geometry of the model, either through the library or with other processing functions?  Thank you.
Re: Finding bounds of imported OBJ model
Reply #1 - Feb 27th, 2006, 9:23pm
 
Tatsuya's lib gives a nice function to return the vertex information (x,y,z) of any vertex.

Look it up, it's a method function.

You can use this to cycle through all vertices. Then it's a simple test to see which has the farthest X Y and Zs for a bounding box.

~M
Page Index Toggle Pages: 1