Click or drag to resize
DigitalRunePerspectiveProjection Class
Defines a perspective projection.
Inheritance Hierarchy
SystemObject
  DigitalRune.GraphicsProjection
    DigitalRune.GraphicsPerspectiveProjection

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public class PerspectiveProjection : Projection

The PerspectiveProjection type exposes the following members.

Constructors
  NameDescription
Public methodPerspectiveProjection
Initializes a new instance of the PerspectiveProjection class.
Top
Methods
  NameDescription
Public methodClone
Creates a new Projection that is a clone (deep copy) of the current instance.
(Inherited from Projection.)
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified Projection.
(Overrides ProjectionCloneCore(Projection).)
Protected methodComputeProjection
Computes the projection matrix.
(Overrides ProjectionComputeProjection.)
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the Projection derived class.
(Overrides ProjectionCreateInstanceCore.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberFromMatrix
Creates an perspective projection from a 4x4 transformation matrix.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInvalidate
Invalidates the projection matrix.
(Inherited from Projection.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSet(Matrix44F)
Sets the perspective projection from the given projection matrix.
(Overrides ProjectionSet(Matrix44F).)
Public methodSet(Single, Single)
Sets a symmetric, perspective projection based on size.
Public methodSet(Single, Single, Single, Single)
Sets a symmetric, perspective projection based on size and depth.
Public methodSetFieldOfView(Single, Single)
Sets a symmetric, perspective projection based on field of view.
Public methodSetFieldOfView(Single, Single, Single, Single)
Sets a symmetric, perspective projection based on field of view and depth.
Public methodSetOffCenter(Single, Single, Single, Single)
Sets an asymmetric (off-center), perspective projection based on the given values.
Public methodSetOffCenter(Single, Single, Single, Single, Single, Single)
Sets an asymmetric (off-center), perspective projection based on the given values (including depth).
Public methodToMatrix44F
Converts a projection to a 4x4 transformation matrix.
(Inherited from Projection.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodToXna
Converts a projection to a 4x4 transformation matrix (XNA Framework). (Only available in the XNA-compatible build.)
(Inherited from Projection.)
Top
Operators
Properties
  NameDescription
Public propertyAspectRatio
Gets the aspect ratio (width / height) of the view.
(Inherited from Projection.)
Public propertyBottom
Gets or sets the minimum y-value of the view volume at the near view-plane.
(Inherited from Projection.)
Public propertyDepth
Gets the depth of the view volume (Far - Near).
(Inherited from Projection.)
Public propertyFar
Gets or sets the distance to the far view plane.
(Inherited from Projection.)
Public propertyFieldOfViewX
Gets the horizontal field of view in radians.
(Inherited from Projection.)
Public propertyFieldOfViewY
Gets the vertical field of view in radians.
(Inherited from Projection.)
Public propertyHeight
Gets the height of the view volume at the near view plane.
(Inherited from Projection.)
Public propertyInverse
Gets the inverse of the projection matrix.
(Inherited from Projection.)
Public propertyLeft
Gets or sets the minimum x-value of the view volume at the near view-plane.
(Inherited from Projection.)
Public propertyNear
Gets or sets the distance to the near view plane.
(Inherited from Projection.)
Public propertyNearClipPlane
Gets or sets the near clip plane in view space.
Public propertyRight
Gets or sets the maximum x-value of the view volume at the near view-plane.
(Inherited from Projection.)
Public propertyTop
Gets or sets the maximum y-value of the view volume at the near view-plane.
(Inherited from Projection.)
Public propertyViewVolume
Gets (or sets) the shape of the view volume (viewing frustum).
(Inherited from Projection.)
Public propertyWidth
Gets the width of the view volume at the near view plane.
(Inherited from Projection.)
Top
Remarks

The perspective projection can be set in several ways:

The property ViewVolume defines the bounding shape of the projection which can be used for frustum culling. The shape is updated automatically when the properties of the projection change.

This class supports near plane clipping for portal and reflection rendering, see NearClipPlane.

See Also