OpenSceneGraph 2.8.4
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
osg::CameraView Class Reference

CameraView - is a Transform that is used to specify camera views from within the scene graph. More...

Inheritance diagram for osg::CameraView:
Inheritance graph
[legend]

List of all members.

Public Types

enum  FieldOfViewMode { UNCONSTRAINED, HORIZONTAL, VERTICAL }

Public Member Functions

 CameraView ()
 CameraView (const CameraView &pat, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, CameraView)
void setPosition (const Vec3d &pos)
 Set the position of the camera view.
const Vec3dgetPosition () const
 Get the position of the camera view.
void setAttitude (const Quat &quat)
 Set the attitude of the camera view.
const QuatgetAttitude () const
 Get the attitude of the camera view.
void setFieldOfView (double fieldOfView)
 Set the field of view.
double getFieldOfView () const
 Get the field of view.
void setFieldOfViewMode (FieldOfViewMode mode)
 Set the field of view mode - controlling how the field of view of the camera is constrained by the CameaView settings.
FieldOfViewMode getFieldOfViewMode () const
 Get the field of view mode.
void setFocalLength (double focalLength)
 Set the focal length of the camera.
double getFocalLength () const
 Get the focal length of the camera.
virtual bool computeLocalToWorldMatrix (Matrix &matrix, NodeVisitor *nv) const
virtual bool computeWorldToLocalMatrix (Matrix &matrix, NodeVisitor *nv) const

Protected Member Functions

virtual ~CameraView ()

Protected Attributes

Vec3d _position
Quat _attitude
double _fieldOfView
FieldOfViewMode _fieldOfViewMode
double _focalLength

Detailed Description

CameraView - is a Transform that is used to specify camera views from within the scene graph.

The application must attach a camera to a CameraView via the NodePath from the top of the scene graph to the CameraView node itself, and accumulate the view matrix from this NodePath.


Member Enumeration Documentation

Enumerator:
UNCONSTRAINED 
HORIZONTAL 
VERTICAL 

Constructor & Destructor Documentation

osg::CameraView::CameraView ( )
osg::CameraView::CameraView ( const CameraView pat,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
) [inline]
virtual osg::CameraView::~CameraView ( ) [inline, protected, virtual]

Member Function Documentation

virtual bool osg::CameraView::computeLocalToWorldMatrix ( Matrix matrix,
NodeVisitor nv 
) const [virtual]

Reimplemented from osg::Transform.

virtual bool osg::CameraView::computeWorldToLocalMatrix ( Matrix matrix,
NodeVisitor nv 
) const [virtual]

Reimplemented from osg::Transform.

const Quat& osg::CameraView::getAttitude ( ) const [inline]

Get the attitude of the camera view.

double osg::CameraView::getFieldOfView ( ) const [inline]

Get the field of view.

FieldOfViewMode osg::CameraView::getFieldOfViewMode ( ) const [inline]

Get the field of view mode.

double osg::CameraView::getFocalLength ( ) const [inline]

Get the focal length of the camera.

const Vec3d& osg::CameraView::getPosition ( ) const [inline]

Get the position of the camera view.

osg::CameraView::META_Node ( osg  ,
CameraView   
)
void osg::CameraView::setAttitude ( const Quat quat) [inline]

Set the attitude of the camera view.

void osg::CameraView::setFieldOfView ( double  fieldOfView) [inline]

Set the field of view.

The cameras field of view can be constrained to either the horizontal or vertex axis of the camera, or unconstrained in which case the camera/application are left to choose an appropriate field of view. The default value if 60 degrees.

void osg::CameraView::setFieldOfViewMode ( FieldOfViewMode  mode) [inline]

Set the field of view mode - controlling how the field of view of the camera is constrained by the CameaView settings.

void osg::CameraView::setFocalLength ( double  focalLength) [inline]

Set the focal length of the camera.

A focal length of 0.0 indicates that the camera/application should determine the focal length. The default value is 0.0.

void osg::CameraView::setPosition ( const Vec3d pos) [inline]

Set the position of the camera view.


Member Data Documentation

double osg::CameraView::_fieldOfView [protected]
double osg::CameraView::_focalLength [protected]

The documentation for this class was generated from the following file:

osg logo
Generated at Sun Jan 8 2012 13:16:06 for the OpenSceneGraph by doxygen 1.7.4.