Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# 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:

[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 Vec3d & | getPosition () const
| Get the position of the camera view.
void | setAttitude (const Quat &quat)
| Set the attitide of the camera view.
const Quat & | getAttitude () const
| Get the attitide 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 contrained 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 accimulate the view matrix from this NodePath.

## Member Enumeration Documentation

enum osg::CameraView::FieldOfViewMode

  | Enumeration values:
  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 attitide 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 attitide of the camera view.

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

| Set the field of view. The cameras field of view can be contrained 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 degrres.

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

| Set the field of view mode - controlling how the field of view of the camera is contrained 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

Quat osg::CameraView::_attitude`[protected]`

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

FieldOfViewMode osg::CameraView::_fieldOfViewMode`[protected]`

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

Vec3d osg::CameraView::_position`[protected]`

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

- CameraView