[osg-users] Camera control and view matrix

Tomlinson, Gordon GTOMLINSON at overwatch.textron.com
Wed Sep 17 08:32:45 PDT 2008


Quats use radians so you need to go from degrees to radians
 
See http://www.vis-sim.com/osg/osg_faq_1.htm#f16

I have posted other  links to this topic in the past so a search of the
archives should pop them up


Gordon

__________________________________________________________
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com


__________________________________________________________
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Brian R
Hill
Sent: Wednesday, September 17, 2008 10:55 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Camera control and view matrix

Here's what I do using euler angles (_camAng) and position (_camPos).

osg::Quat quat(_camAng[0],osg::X_AXIS,_camAng[1],osg::Y_AXIS,_camAng
[2],osg::Z_AXIS);
osg::Matrix viewMat = osg::Matrix::rotate(quat) * osg::Matrix::translate
(_camPos); viewMat.preMult(osg::Matrix::rotate(osg::PI_2,osg::X_AXIS));
viewMat.invert(viewMat);
_camera->setViewMatrix(viewMat);

Brian

 -----osg-users-bounces at lists.openscenegraph.org wrote: -----

To: "OSG Mailing List" <osg-users at lists.openscenegraph.org>
From: "Renan Mendes" <renanmzmendes at gmail.com> Sent by:
osg-users-bounces at lists.openscenegraph.org
Date: 09/17/2008 10:30AM
Subject: [osg-users] Camera control and view matrix

Hi,

    I need some references on camera control and view matrices. The
    tutorial in OSG's website is outdated, for it still makes use of
    osg::Producer. Can anyone send me a few suggestions?


                 Thanks,

                       Renan M Z Mendes

_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g


_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g



More information about the osg-users mailing list