Dario Minieri wrote:
Now, when I search a DOF node by name with a visitor, I find always the first
DOF in the first model LOD hierarchy, obviously. So, if I'm viewing the first
range I have no problems, but if I'm viewing the second I see no movement
because the catched DOF is related to an unloaded model.
Assuming the scene graph structure isn't changing dynamically, you should only
need to find the DOFTransform nodes once, at model load time. You should be
able to easily modify your existing visitor to find both (not just one) of the
Transforms.
After modifying the first Transform, copy it onto the second Transform. For a
MatrixTransform, this is just a matrix copy. Not sure what you'd need to do to
copy a DOFTransform; check the header.
Then, I wondered if there is another smart form for models with LOD and DOF (maybe
something can unify the DOF) or if I have to change the code to check what is the
current displayed model and then catch the correct DOF.
I think you always want to change both Transforms so that when you switch from
one LOD to the other, both models are transformed the same.
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org