Hi -

I loaded an OpenFlight model with several DOFTransforms.   I noticed,
upon looking in the debugger, that the InversePut matrix of the DOFT(s)
seem to have all its values in absolute coordinates despite several
DOFTransforms being children of other DOFTs; I know they are children
because I parse the scene graph and I see that one DOFT is a child of
another, etc.   The Transform::ReferenceFrame clearly states that the
values are in RELATIVE_RF, but it's obvious by just looking at the model
(and in the debugger) that the values could not possibly be relative; if
they were the subordinate parts of the DOFT would be way off the model;
but they are not.  They are spot-on and when I animate the DOFTs,
everything seems to work perfectly.  All the (sub)vertices also seem to
be in absolute.

I'm not very familiar with the OpenFlght standard, so I don't know if
it's the model that's build that way, or if it's OSG's interpretation
when it imports the model.   If the O.F is build that way, then why does
OSG say RELATIVE_RF?  If its OSG, is there not some redundant
calculation being done since the values appear to all be in absolute;
but they must as some point be converted to relative, no?

I've provided part of the callstack of the 2 DOFTs (that are of concern)
below.  The cannon should be relative to the turret.  And just looking
at the model, there is no way the cannon is ~2 meters away (in both y,
and z axis) from the turret if they are relative to each other.  It just
doesn't make sense; however, it looks fine in the visual - so values are
somehow interpreted properly.  In Z, they should be about 15cm away (ie:
2.0553188323974609 - 1.8663945198059082) from each other but its showing
2.0553188323974609m.  

Any help would be appreciated.  

Thanks


-       osg::Transform  {_referenceFrame=RELATIVE_RF }  const
osg::Transform
+       osg::Object     {_name={"TURRET"} _dataVariance=DYNAMIC
_userData={_ptr=0x00000000 {_refMutex=??? _refCount=??? _observers=??? }
} }     osg::Object
-       _inversePut     {_mat=0x0aa3fa90 }      osg::Matrixd
-       _mat    0x0aa3fa90      double [4][4]
+       [0]     0x0aa3fa90      double [4]
+       [1]     0x0aa3fab0      double [4]
+       [2]     0x0aa3fad0      double [4]
-       [3]     0x0aa3faf0      double [4]
                                        [0]     -0.0068642422556877136
double
                                        [1]     0.082249075174331665
double
                                        [2]     1.8663945198059082
double
                                        [3]     1.0000000000000000
double




-       osg::Transform  {_referenceFrame=RELATIVE_RF }  const
osg::Transform
+       osg::Object     {_name={"CANNON"} _dataVariance=DYNAMIC
_userData={_ptr=0x00000000 {_refMutex=??? _refCount=??? _observers=??? }
} }     osg::Object
-       _inversePut     {_mat=0x0ab78d80 }      osg::Matrixd
-       _mat    0x0ab78d80      double [4][4]
+       [0]     0x0ab78d80      double [4]
+       [1]     0x0ab78da0      double [4]
+       [2]     0x0ab78dc0      double [4]
-       [3]     0x0ab78de0      double [4]
                                        [0]     -0.0068642422556877136
double
                                        [1]     1.5622954368591309
double
                                        [2]     2.0553188323974609
double
                                        [3]     1.0000000000000000
double


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to