Hi Vincent,

I really don't understand what you are trying to do, could you back
out and explain what you are trying to do.  And could you check your
formating as the emails coming through with lots of indentation and
superflous line breaks that making reading it hard.

Robert.

On 6/8/06, Vincent <[EMAIL PROTECTED]> wrote:




Looking through OSG's history with this function, I'm guessing the way I
need this implemented did not happen, or I'm dealing with a software bug (on
my part or OSGs part)…having problems knowing if I've even using this
function properly.



Doing this below seem to ignore my eye point translation and is only taking
the rotation.  If an eyepoint offset translation cannot be set, any ideas on
how I can get both a translation and rotation as an eyepoint offset?





                  cameraRotation.makeRotate(

                        osg::DegreesToRadians(-90.0), osg::Vec3d(1, 0, 0),

                        0,osg::Vec3d(0, 1, 0),


osg::DegreesToRadians(-heading_offset),osg::Vec3d(0, 1, 0 )
)  ;



                  osg::Matrixd cameraoffset  = cameraRotation * cameraTrans;




viewer_.getCamera(0)->setOffset(cameraoffset.ptr());





I'm checking the code above with this function, where I would have expected
to get the translation offset added into my translation.
"inverseMatrix.getTrans();"



XXX::PreFrame(const Producer::Camera &cam)

{

      //this is our position

      osg::Matrix model = osg::Matrix(cam.getViewMatrix());



osg::Matrix inverseMatrix;

      osg::Matrix rotationtest;

      rotationtest.makeRotate(-M_PI/2.0, 1, 0, 0);



      inverseMatrix.invert( model );

      inverseMatrix = rotationtest * inverseMatrix;



xyzlocation_ = inverseMatrix.getTrans();

}





as an FYI, I'm using osg's manipulators…
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


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

Reply via email to