Am 25.07.2011 17:15, schrieb Oren Fromberg:
Hey Sebastian!
Thanks for the interesting reply. So, I guess that explains why the dimensions
of my bounding box are tending to infinity! I have some questions though:
1) what do you mean by "load the proxy node at least once"? does that mean to
add the proxy node as a child in the scene or just to add a reference to that node?
The proxynode usually references an actual file. So simply load it via
osgDB::readNodeFile. You can then retrieve its bounds.
If you're only interested in the bounds, put them to the proxyNode or
simply store them elsewhere.
The loaded node will be deleted in case you don't reference it further
(see osg::ref_ptr for this)
2) what do you mean by "hook up in the load callbacks"?
OSGDb allows you to hook up into its loading callbacks.
For this you'll have to create a callback class and derive it from
osgDB::Registry::ReadFileCallback. See the Callback example for more info.
This way you can control/check what is loaded, or modify the loaded node
before putting it into the scenegraph.
3) what does your database compiler do?
Basically I have to load big databases from openflight. In order to
handle certain models differently I hook up into the loading, load the
node, check some of its properties and put into a own datastructure.
Later on, I can save those models without including it into the
resulting .ive file, as it wouldn't fit there really.
If you use osgconv it usally will put all referenced nodes (i.e.
proxynodes) into the resulting export, which gives poor control over
instancing, optimization etc.
If you maybe elaborate what you are trying to achive, there might be
more useful input of others ;-)
cheers
Sebastian
Thanks so much!
Sincerely,
Oren
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41609#41609
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org