Howdy friends,

I'm loading a model using an osg::ProxyNode like this:


Code:

std::map <std::string, osg::ref_ptr<osg::Node> > model_db_map;
...
if (model_db_map[name] == NULL)
{
osg::ref_ptr<osg::ProxyNode> pn = new osg::ProxyNode;
pn->setLoadingExternalReferenceMode 
(osg::ProxyNode::DEFER_LOADING_TO_DATABASE_PAGER);
pn->setFileName (0, name + ".ive");
model_db_map[name] = pn;
}




shortly after this I compute the bounding box like this:

Code:

osg::ref_ptr<Node> node = model_db_map[name];
osg::ComputeBoundsVisitor bb;
node->accept(bb);




problem is I then get this for bb.getBoundingBox()._min:

Code:
(gdb) p bboxMin
$1 = {_v = {3.40282347e+38, 3.40282347e+38, 3.40282347e+38}}



and this for bb.getBoundingBox()._max:

Code:
(gdb) p bboxMax
$2 = {_v = {-3.40282347e+38, -3.40282347e+38, -3.40282347e+38}}



and my stdout gets repeatedly bombed with this:


Code:
CullVisitor::apply(Geode&) detected NaN,
    depth=nan, center=(0 0 0),
    matrix={
        nan nan nan nan 
        nan nan nan nan 
        nan nan nan nan 
        nan nan nan nan 
}




Why is this so? The bounding box is computed correctly when using 
osgDB::readNodeFile instead of osg::ProxyNode. Thanks in advance.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41522#41522





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to