User Tools

Site Tools


DzCamera

Base class for all camera objects.

More...

Inherits :

Inherited By : DzBasicCamera and DzLight

Enumerations

Properties

Methods

Signals

Detailed Description

TODO: Add detailed description.

Enumerations


: CameraDimension

The dimensions of a camera.

Since:

  • 4.6.4.70
  • LOCAL_PIXEL_WIDTH - The width in pixels. Since: 4.6.4.70
  • LOCAL_PIXEL_HEIGHT - The height in pixels. Since: 4.6.4.70
  • LOCAL_ASPECT_WIDTH - The relative width of the aspect frame. Since: 4.6.4.70
  • LOCAL_ASPECT_HEIGHT - The relative height of the aspect frame. Since: 4.6.4.70

—–

: CameraType

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

  • 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.

—–

: HeadlightMode

The modes of the headlight for the camera.

Since:

  • 4.7.1.94
  • hmAuto - The headlight is automatically on or off depending on whether or not lights are in the scene. Since: 4.7.1.94
  • hmOn - The headlight is on. Since: 4.7.1.94
  • hmOff - The headlight is off. Since: 4.7.1.94

Properties


Number : aspectHeight

The aspect height of the camera.

Since:

  • 4.6.4.67

Number : aspectRatio

The aspect ratio of the camera (w / h).

Since:

  • 4.6.4.67

See Also:


Number : aspectWidth

The aspect width of the camera.

Since:

  • 4.6.4.67

Number : farClippingPlane

The distance of the far clipping plane from the camera. (Read Only)


Number : focalDistance

The focal distance of the camera.


Number : focalLength

The focal length of the camera.


Number : frameWidth

The width of the frame (film/sensor) of the camera (in mm). (Read Only)

Since:

  • 4.6.4.67

HeadlightMode : headlightMode

The mode of the headlight.

Since:

  • 4.7.1.94

DzVec3 : headlightOffset

The relative offset of the headlight from the camera.

Since:

  • 4.7.1.94

Number : nearClippingPlane

The distance of the near clipping plane from the camera. (Read Only)


Number : pixelsHeight

The pixels height of the camera.

Since:

  • 4.6.4.67

Number : pixelsWidth

The pixels width of the camera.

Since:

  • 4.6.4.67

Boolean : proportionsConstrained

Whether or not the proportions of the camera is constrained.

Since:

  • 4.6.4.70

Number : type

The type of the camera. (Read Only)


Boolean : useLocalDimensions

Whether or not to use the local dimensions of the camera.

Since:

  • 4.6.4.67

Methods


void : aimAt( DzVec3 pos )

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

Parameter(s):

  • pos - The point to aim the camera at.

void : 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)

Parameter(s):

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

Number : getFieldOfView()

Return Value:

  • The angle, in radians, of the horizontal field of view (FOV) for the camera (rectilinear lens).

Attention:

  • The following formula is used to calculate the horizontal FOV:
angle = 2 * (arctan(frameWidth)/(2 * focalLength)))

The aspect of the frame can be manipulated by the user. Therefore, calculating the vertical and/or diagonal FOV is accomplished using the aspect ratio.

See Also:


DzVec3 : getFocalPoint()

Return Value:

  • The focal point of the camera.

DzLight : getHeadlight()

Return Value:

  • 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 : isViewCamera()

Return Value:

  • true if this is a non-animatable view camera, otherwise false.

void : reset()

Resets the camera viewing parameters to defaults.


Boolean : shouldDoHeadLight( Boolean hasLights, Boolean isRender )

TODO: Add description.


Boolean : shouldSortOnLoad()

Return Value:

  • true if this element should have its property groups and properties sorted after being created on load, otherwise false.

void : updateDimensions( CameraDimension anchor )

TODO: Add description.

Signals


void : aspectHeightChanged( Number height )

Signature:“aspectHeightChanged(float)”

Emitted when the aspect height dimension of the camera changes.


void : aspectRatioChanged()

Signature:“aspectRatioChanged()”

Emitted when the camera's aspect ratio changes.


void : aspectWidthChanged( Number width )

Signature:“aspectWidthChanged(float)”

Emitted when the aspect width dimension of the camera changes.


void : dimensionsChanged()

Signature:“dimensionsChanged()”

Emitted when any of the local dimensions of the camera change.


void : focalDistanceChanged( DzTimeRange range )

Signature:“focalDistanceChanged(const DzTimeRange&)”

Emitted when the focal distance channel changes.

Parameter(s):

  • range - The time range over which the channel changed.

void : focalLengthChanged( DzTimeRange range )

Signature:“focalLengthChanged(const DzTimeRange&)”

Emitted when the focal length channel changes.

Parameter(s):

  • range - The time range over which the channel changed.

void : frameWidthChanged( Number size )

Signature:“frameWidthChanged(float)”

Emitted when the frame width of the camera changes.


void : headlightModeChanged()

Signature:“headlightModeChanged()”

Emitted when headlight mode of the camera changes.


void : headlightOffsetChanged()

Signature:“headlightOffsetChanged()”

Emitted when headlight offset of the camera changes.


void : pixelDimensionsChanged()

Signature:“pixelDimensionsChanged()”

Emitted when the local pixel dimensions of the camera change.


void : pixelsHeightChanged( Number height )

Signature:“pixelsHeightChanged(int)”

Emitted when the pixel height dimension of the camera changes.


void : pixelsWidthChanged( Number width )

Signature:“pixelsWidthChanged(int)”

Emitted when the pixel width dimension of the camera changes.


void : projectionChanged()

Signature:“projectionChanged()”

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


void : proportionsConstrainedChanged( Boolean yesNo )

Signature:“proportionsConstrainedChanged(bool)”

Emitted when the option for whether or not to constrain proportions of the local dimensions of the camera changes.


void : useLocalDimensionsChanged( Boolean yesNo )

Signature:“aspectRatioChanged(bool)”

Emitted when the option for whether or not to use the local dimensions of the camera changes.