On 12/08/2010 10:36 AM, Paavo M??kel?? wrote:
Hi,
I recently started learning OSG and everything has worked Ok, but I ran into a
(possibly trivial) problem. I have a simple scenegraph with 2 models in it
(osg::Node) and they have osg::MatrixTransformation parents. This works just
fine..
Then I changed the MatrixTransforms into osgSim::DOFTransforms, and the models
no longer appear! In renderstats the figures look the same as earlier, so the
models definitely are there somewhere. What am I missing here?
Most likely, you're not using DOFTransform correctly. DOFTransform was
written specifically to accomodate the way OpenFlight models specify
transformations (particularly, animated transformations). Is there a
specific reason you're using DOFTransform? If not, I recommend sticking
with MatrixTransform (or PositionAttitudeTransform, if its more
convenient for what you're doing).
If you going just from a MatrixTransform to a DOFTransform, you should
probably only be using the setCurrentTranslation(), setCurrentHPR(), and
setCurrentScale() methods. The setPutMatrix() and setInversePutMatrix()
are used only to position the center of rotation. Also, keep in mind
that setCurrentHPR() takes radians, not degrees.
--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org