DzCamera Class Reference
[Scene Items]

Base class for all camera objects. More...

Inheritance diagram for DzCamera:

DzNode DzElement DzBase QObject Object DzBasicCamera DzLight DzShaderCamera DzDistantLight DzShaderLight DzPointLight DzSpotLight List of all members.

Enumerations

enum  CameraType {
  FRONT_CAMERA, BACK_CAMERA, LEFT_CAMERA, RIGHT_CAMERA,
  TOP_CAMERA, BOTTOM_CAMERA, PERSPECTIVE_CAMERA, ORTHO_CAMERA,
  GENERAL_CAMERA
}

Properties

Number aspectRatio
Number farClippingPlane
Number focalDistance
Number focalLength
Number nearClippingPlane
Number type

Methods

void aimAt (DzVec3 pos)
void frame (DzBox3 box, Number aspect)
Number getFieldOfView ()
DzVec3 getFocalPoint ()
DzLight getHeadlight ()
Boolean isViewCamera ()
void reset ()

Signals

void aspectRatioChanged ()
 Signature: "aspectRatioChanged()"
void focalDistanceChanged (DzTimeRange range)
 Signature: "focalDistanceChanged(const DzTimeRange&)"
void focalLengthChanged (DzTimeRange range)
 Signature: "focalLengthChanged(const DzTimeRange&)"
void projectionChanged ()
 Signature: "projectionChanged()"

Detailed Description

Base class for all camera objects.


Member Enumeration Documentation

enum DzCamera::CameraType

The different types of camera. Each has its own default parameters which it resets to and are either orthogonal or perspective by definition.

Enumerator:
FRONT_CAMERA  Orthogonal camera positioned to view the front of a figure
BACK_CAMERA  Orthogonal camera positioned to view the back of a figure
LEFT_CAMERA  Orthogonal camera positioned to view the left side of a figure
RIGHT_CAMERA  Orthogonal camera positioned to view the right side of a figure
TOP_CAMERA  Orthogonal camera positioned to view a figure from the top
BOTTOM_CAMERA  Orthogonal camera positioned to view a figure from the bottom
PERSPECTIVE_CAMERA  Default perspective camera - defaults to a front view of a figure
ORTHO_CAMERA  General Orthogonal camera
GENERAL_CAMERA  General Perspective camera


Member Function Documentation

void DzCamera::aimAt ( DzVec3  pos  ) 

Rotates the camera and adjusts its focal distance so that its focal point is at the given point.

Parameters:
pos The point to aim the camera at.

Reimplemented in DzBasicCamera.

void DzCamera::aspectRatioChanged (  )  [signal]

Signature: "aspectRatioChanged()"

Emitted when the camera's aspect ratio changes. Currently not implemented.

DzCamera::focalDistanceChanged ( DzTimeRange  range  )  [signal]

Signature: "focalDistanceChanged(const DzTimeRange&)"

Emitted when the focal distance channel changes.

Parameters:
range The time range over which the channel changed.

DzCamera::focalLengthChanged ( DzTimeRange  range  )  [signal]

Signature: "focalLengthChanged(const DzTimeRange&)"

Emitted when the focal length channel changes.

Parameters:
range The time range over which the channel changed.

void DzCamera::frame ( DzBox3  box,
Number  aspect 
)

Translates the camera so that its view frames the given box, and sets the camera's focal point to the center of the box, given the aspect ratio of the current view (w / h)

Parameters:
box The bounding box to frame in the camera's view
aspect The aspect ratio of the current view.

Reimplemented in DzBasicCamera.

Number DzCamera::getFieldOfView (  ) 

Returns:
The camera's field of view (in radians).

DzVec3 DzCamera::getFocalPoint (  ) 

Returns:
The camera focal point

DzLight DzCamera::getHeadlight (  ) 

Returns:
A light that lights the scene in front of the camera. Used for rendering by OpenGL and offline renderers when no lights exist in the scene. This headlight is created on demand - i.e. no headlight for this camera exists until this function is called the first time.

Boolean DzCamera::isViewCamera (  ) 

Returns:
true if this is a non-animatable view camera.

void DzCamera::projectionChanged (  )  [signal]

Signature: "projectionChanged()"

Emitted when projection of the camera changes and its view must be redrawn.

void DzCamera::reset (  ) 

Resets the camera viewing parameters to defaults.

Reimplemented in DzBasicCamera.


Member Data Documentation

Number DzCamera::aspectRatio

The aspect ratio of the camera. Currently not implemented.

Number DzCamera::farClippingPlane

[Read Only] The distance of the far clipping plane from the camera.

Number DzCamera::focalDistance

The focal distance of the camera.

Number DzCamera::focalLength

The focal length of the camera.

Number DzCamera::nearClippingPlane

[Read Only] The distance of the near clipping plane from the camera.

Number DzCamera::type

[Read Only] The type of the camera.


Generated on Thu Sep 24 12:21:11 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.