    Contents  Index  Topic Contents
    Previous Topic: Static Fields Relevant to BooleanBvr Objects
    Next Topic: Static Methods Relevant to ColorBvr Objects

> ## Static Methods Relevant to CameraBvr Objects

> ###

> parallelCamera

> Statics 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 considered as "up."

> public static CameraBvr parallelCamera(
> NumberBvr nearclip
> );

> ##### Parameters

> nearclip
>   The NumberBvr object that is the Z-location of the near clipping plane. This parameter can also be of type double.

> ##### Return Values

> Returns the CameraBvr object.

> ###

> perspectiveCamera

> Statics 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 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.)

> public static CameraBvr perspectiveCamera(
> NumberBvr projdst,
> NumberBvr nearclip
> );

> ##### Parameters

> projdst
>   The NumberBvr object that is the Z-location of the projection point. It must be greater than zero. This parameter can also be of type double.
> nearclip
>   The NumberBvr object that is the Z-location of the near clipping plane. It must be less than projdst. This parameter can also be of type double.

> ##### Return Values

> Returns the CameraBvr 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.

> © 1998 Microsoft Corporation. All rights reserved. Terms of Use.

> Top of Page