DAStatics Functions Relevant to DACamera Objects

ParallelCamera Creates a parallel camera for parallel (or orthographic) projection. Same as ParallelCameraAnim except nearclip is a nonanimated number (a double).
ParallelCameraAnim Creates a parallel camera for parallel (or orthographic) projection.
PerspectiveCamera Creates a perspective camera for perspective rendering. Same as PerspectiveCameraAnim, except that projdist and nearclip are nonanimated numbers (doubles).
PerspectiveCameraAnim Creates a perspective camera for perspective rendering.

ParallelCamera

DAStatics Class

Creates a parallel camera for parallel (or orthographic) projection. Same as ParallelCameraAnim except nearclip is a nonanimated number (a double).

Syntax

lib.ParallelCamera( nearclip )

Parameters

nearclip
A double value that is the z-location of the near clipping plane. This is a nonanimated number.

Return Value

Returns the DACamera object.

ParallelCameraAnim

DAStatics Class

Creates a parallel camera for parallel (or orthographic) projection. The parallel camera is transformed the same way as the perspective camera, except that z-scales have no effect. Note, however, that zero or negative z-scales yield undefined results.

Prior to transformation, the parallel camera gazes in the negative z-direction, with positive y-axis considered as "up."

Syntax

lib.ParallelCameraAnim( nearclip )

Parameters

nearclip
DANumber object that is the z-location of the near clipping plane. This value must be an animated number.

Return Value

Returns the DACamera object.

PerspectiveCamera

DAStatics Class

Creates a perspective camera for perspective rendering. Same as PerspectiveCameraAnim, except that projdist and nearclip are nonanimated numbers (doubles).

Syntax

lib.PerspectiveCamera( projdist, nearclip )

Parameters

projdist
A double value that is the z-location of the projection point. It must be greater than zero. This is a nonanimated number.
nearclip
A double value that is the z-location of the near clipping plane. It must be less than projdist. This is a nonanimated number.

Return Value

Returns the DACamera object.

Remarks

The following diagram shows a model of the perspective camera. Note that the nearclip need not be in front of the image plane.

Perspective Camera

PerspectiveCameraAnim

DAStatics Class

Creates a perspective camera for perspective rendering. On creation, the projection plane (the plane at which objects appear as their actual size) is located at Z=0, the projection point is located at [0 0 projdist], and the near clipping plane is located at [0 0 nearclip].

The projdist parameter specifies the distance between the projection plane and the projection point, and must be greater than zero. The smaller this distance, the more of a wide-angle effect is achieved. The larger this distance, the more of a telephoto effect is achieved.

The nearclip parameter specifies the z-location of the near clipping plane and must be less than projdist. In other words, the near clipping plane must lie on the same side of the projection point as the projection plane. Although it is tempting to place the near clipping plane as close as possible to the projection point, z-buffer precision is reduced dramatically as the near clipping plane gets closer to the projection point. (The main result of such precision loss is that far objects are rendered in front of near objects.)

Syntax

lib.PerspectiveCameraAnim( projdist, nearclip )

Parameters

projdist
DANumber object that is the z-location of the projection point. It must be greater than zero. This value must be an animated number.
nearclip
DANumber object that is the z-location of the near clipping plane. It must be less than projdist. This value must be an animated number.

Return Value

Returns the DACamera object.

Remarks

The following diagram shows a model of the perspective camera. Note that the nearclip need not be in front of the image plane.

Perspective Camera


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.