Hi,
I was running a small test program to understand the concept a little better:
Code:
int main()
{
int numChildren, num1, num2, num3;
const char* geodeName;
const char* cowChildrenName;
osg::Group* root = new osg::Group();
osg::Node* cow = osgDB::readNodeFile("cow.osg");
root->addChild(cow);
geodeName = cow->asGroup()->getChild(0)->className();
numChildren = root->getNumChildren();
num1 = cow->asGroup()->getChild(0)->asGeode()->getNumDrawables();
num2 = cow->asGroup()->getNumChildren();
num3 = cow->asGeode()->getNumDrawables();
_getch();
return 0;
}
The cow Node has 1 child i.e. a Geode. But when I try and query it for number
of drawables using the line num3 = cow->asGeode()->getNumDrawables(); I get an
exception error.
So how do I query it or get the number of drawables ?
Thanks.
Sincerely,
Sanat.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31175#31175
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org