Couple of things: First, the rotation of the camera is not normally done on the Projection matrix, so, while Robert points out that the Projection Matrix is named a "Lens" in Producer, it is not the appropriate place to put in a camera rotation (or translation). Producer::Camera has a setOffset() method, which is the appropriate place to put camera offsets. This matrix is applied after the Projection matrix and, in essence, represents the initial view of the camera.
You can set your rotations/translations in the Matrix and pass matrix.ptr() to camera->setOffset().
Shears in Producer, however, are done in normalized device coordinates and are therefore applied to the Lens, or Projection matrix. This simplifies greatly the task of producing assymetrical frustums.
-don
On 8/8/06, Markus Trenkwalder <[EMAIL PROTECTED]> wrote:
Robert Osfield wrote:
> Hi Markus,
>
> You can do this all within the Producer config file. There are
> specific shear and rotate options available, both in the .cfg format
> and the Preducer::Camera and Producer::CameraConfig.
Thank you Robert for your help. I did find methods to get/set a shear
value. I also found the methods to get/set the projection matrix but I
did not find any methods to get or set a rotation. I could do the
rotation myself but if there does exist such a function I'd rather use
it than implement it on my on.
Could anyone please give me a hint where to start looking for the config
file settings?
Thank you
Markus
--
Dipl.-Ing. Markus Trenkwalder
Software Architecture & Development
_________
(___ ____) www.s-p.cc
___) S&P Simmulationstechnik
Phone: +43 (0)512 393255
Fax: +43 (0)512 393255 33
_______________________________________________
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/
