Open Inventor Reference
SoPerspectiveCamera Class Reference

Perspective camera node. More...

#include <Inventor/nodes/SoPerspectiveCamera.h>

Inheritance diagram for SoPerspectiveCamera:
SoCamera SoNode SoFieldContainer SoBase

List of all members.

Public Member Functions

 SoPerspectiveCamera ()
 Creates a perspective camera node with default settings.
virtual void scaleHeight (float scaleFactor)
 Scales the height of the camera, in this case, the 'heightAngle' field.
virtual SbViewVolume getViewVolume (float useAspectRatio=0.0) const
 Fills in a view volume structure, based on the camera.

Static Public Member Functions

static void initClass ()
 Initializes base node class.

Public Attributes

Fields
SoSFFloat heightAngle
 Vertical angle of the viewing volume.

Protected Member Functions

virtual void viewBoundingBox (const SbBox3f &box, float aspect, float slack)
 Positions camera to view passed bounding box with given aspect ratio and current height angle.
virtual ~SoPerspectiveCamera ()

Detailed Description

A perspective camera defines a perspective projection from a viewpoint. The viewing volume for a perspective camera is a truncated right pyramid.

By default, the camera is located at (0,0,1) and looks along the negative z-axis; the position and orientation fields can be used to change these values. The heightAngle field defines the total vertical angle of the viewing volume; this and the aspectRatio field determine the horizontal angle.

File Format/Default
Action Behavior
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction
Sets the viewport and camera information in the state.
See Also
SbViewVolume, SoOrthographicCamera

Definition at line 104 of file SoPerspectiveCamera.h.


Constructor & Destructor Documentation

SoPerspectiveCamera::SoPerspectiveCamera ( )
virtual SoPerspectiveCamera::~SoPerspectiveCamera ( ) [protected, virtual]

Member Function Documentation

virtual SbViewVolume SoPerspectiveCamera::getViewVolume ( float  useAspectRatio = 0.0) const [virtual]

If the useAspectRatio field is not 0.0 (the default), the camera uses that ratio instead of the one it has.

Implements SoCamera.

static void SoPerspectiveCamera::initClass ( ) [static]

Reimplemented from SoCamera.

virtual void SoPerspectiveCamera::scaleHeight ( float  scaleFactor) [virtual]

Implements SoCamera.

virtual void SoPerspectiveCamera::viewBoundingBox ( const SbBox3f box,
float  aspect,
float  slack 
) [protected, virtual]

Implements SoCamera.


Member Data Documentation


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