Hi Janus,
First up, you can't directly assing a Node* pointer returned from
readNodeFile(...) to osg::Geode*, the compiler won't allow this, and
it wouldn't be safe anyway. You could dynamically cast to Geode* and
then test to see if its not NULL first, but in general it won't be
Geode, so don't code this.
Second all Nodes have bounding spheres, the only exception is Geode.
The robust way to get the bounding box of a subgraph is to use the new
osg::ComputeBoundsVisitor that you'll find in the SVN and 1.9.x
versions.
Robert.
On 5/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Dear all:
I load my object from a file as, e.g.
osg::Geode* geode = osgDB:ReadNodeFile("lz.osg");
How can I extract the bounding box information from it? I need the actual size of the
object (width/length/depth) but not the bounding "sphere" dimensions.
Rgds,
Janusz Goldasz
P.S: I have come across a similar topic discussed on this list some time ago
this year but the other solution (using a bbox visitor) does not work for me.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/