Index Topic Contents | |||
Previous Topic: DAStatic Properties Relevant to DABoolean Objects Next Topic: DAStatic Functions Relevant to DAColor Objects |
DAStatic Functions Relevant to DACamera Objects
DAStatics Class
ParallelCameraAnimCreates 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."
lib.ParallelCameraAnim(
nearclip
)Parameters
- nearclip
- The DANumber object that is the Z-location of the near clipping plane. This value must be an animated number.
Return Values
Returns the DACamera object.
DAStatics Class
ParallelCameraSame as ParallelCameraAnim except nearclip is a non-animated number (a double).
lib.ParallelCamera(
nearclip
)DAStatics Class
PerspectiveCameraAnimCreates 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 projdst], and the near clipping plane is located at [0 0 nearclip].
The projdst 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 projdst. 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 lost 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.)
lib.PerspectiveCameraAnim(
projdst,
nearclip
)Parameters
- projdst
- The 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
- The DANumber object that is the Z-location of the near clipping plane. It must be less than projdst. This value must be an animated number.
Return Values
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 projection plane.
DAStatics Class
PerspectiveCameraSame as PerspectiveCameraAnim, except that projdst and nearclip are non-animated numbers (doubles).
lib.PerspectiveCamera(
projdst,
nearclip
)© 1998 Microsoft Corporation. All rights reserved. Terms of Use.