The Camera class

OpenGL developers often love to use glTranslate() and glRotate() to move the scene, and gluLookAt() to move the camera, although they can all be replaced by the same glMultMatrix() function. In fact, these functions actually do the same thing—calculate the model-view matrix for transforming data from world space to view space. Similarly, OSG provides the osg::Transform class, which can add or set its own matrix to the current model-view matrix when placed in the scene graph, but we always intend to operate on model matrix by using the osg::MatrixTransform and osg::PositionAttitudeTransform subclasses, and handle view matrix with the osg::Camera subclass.

The osg::Camera class is one of the most important classes in the core OSG ...

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.