Mindshifter.LookAtCamera Class Reference

LookAtCamera is a basic camera that defines a view centered at an arbitrary eye point looking toward an arbitrary target point. More...

Inherits Mindshifter.ICamera.

Inheritance diagram for Mindshifter.LookAtCamera:

Inheritance graph
[legend]
Collaboration diagram for Mindshifter.LookAtCamera:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LookAtCamera ()
 Creates a new instance of LookAtCamera with an eye position of (0,0,0) looking down the negative Z axis using a perspective projection with a 45 degree field of view, 4/3 aspect ratio, near plane distance of 1 and far plane distance of 1000.
 LookAtCamera (Vector3 eye, Vector3 lookAt)
 Creates a new instance of LookAtCamera with the specified eye position and look at position using a perspective projection with a 45 degree field of view, 4/3 aspect ratio, near plane distance of 1 and far plane distance of 1000.
 LookAtCamera (Vector3 eye, Vector3 lookAt, float fov, float aspect, float near, float far)
 Creates a new instance of LookAtCamera with the specified eye position and look at position using a perspective projection with the specified projection parameters.
 LookAtCamera (Vector3 eye, Vector3 lookAt, Rectangle rect, float near, float far)
 Creates a new instance of LookAtCamera with the specified eye position and look at position using an orthographic projection with the specified projection parameters.
void Update (float elapsedSeconds)
 Performs any required updates to the camera's values based on the specified elapsed time.
Ray GetPickRay (Vector2 position, Viewport viewport)
 Returns a world space ray cast from the specified screen projected position.

Properties

Matrix ViewMatrix [get]
 Gets the camera's view matrix.
Matrix ProjectionMatrix [get]
 Gets the camera's projection matrix.
Projection Projection [get]
 Gets the camera's projection.
BoundingFrustum Frustum [get]
 Gets the camera's bounding frustum.
Vector3 Position [get, set]
 Gets or sets the camera's eye position.
Vector3 LookAtPosition [get, set]
 Gets or sets the camera's look at position.

Private Member Functions

void BuildMatrix ()
 Builds the camera's view matrix based on its eye point and look at point using the unit Y vector as the up direction.

Private Attributes

Matrix mViewMatrix
Projection mProjection
Vector3 mEyePosition
Vector3 mLookAtPosition
bool mRequiresUpdate

Detailed Description

LookAtCamera is a basic camera that defines a view centered at an arbitrary eye point looking toward an arbitrary target point.

Definition at line 11 of file LookAtCamera.cs.


Constructor & Destructor Documentation

Mindshifter.LookAtCamera.LookAtCamera (  ) 

Creates a new instance of LookAtCamera with an eye position of (0,0,0) looking down the negative Z axis using a perspective projection with a 45 degree field of view, 4/3 aspect ratio, near plane distance of 1 and far plane distance of 1000.

Definition at line 90 of file LookAtCamera.cs.

Mindshifter.LookAtCamera.LookAtCamera ( Vector3  eye,
Vector3  lookAt 
)

Creates a new instance of LookAtCamera with the specified eye position and look at position using a perspective projection with a 45 degree field of view, 4/3 aspect ratio, near plane distance of 1 and far plane distance of 1000.

Parameters:
eye The position of the camera
lookAt The position toward which the camera is pointing

Definition at line 103 of file LookAtCamera.cs.

References Mindshifter.LookAtCamera.mEyePosition, and Mindshifter.LookAtCamera.mLookAtPosition.

Mindshifter.LookAtCamera.LookAtCamera ( Vector3  eye,
Vector3  lookAt,
float  fov,
float  aspect,
float  near,
float  far 
)

Creates a new instance of LookAtCamera with the specified eye position and look at position using a perspective projection with the specified projection parameters.

Parameters:
eye The position of the camera
lookAt The position toward which the camera is pointing
fov The field of view of the camera's perspective projection
aspect The aspect ratio of the camera's perspective projection
near The near frustum plane distance of the camera's projection
far The far frustum plane distance of the camera's projection

Definition at line 120 of file LookAtCamera.cs.

References Mindshifter.LookAtCamera.mEyePosition, Mindshifter.LookAtCamera.mLookAtPosition, Mindshifter.LookAtCamera.mProjection, Mindshifter.LookAtCamera.mRequiresUpdate, and Mindshifter.LookAtCamera.Projection.

Mindshifter.LookAtCamera.LookAtCamera ( Vector3  eye,
Vector3  lookAt,
Rectangle  rect,
float  near,
float  far 
)

Creates a new instance of LookAtCamera with the specified eye position and look at position using an orthographic projection with the specified projection parameters.

Parameters:
eye The position of the camera
lookAt The position toward which the camera is pointing
rect The orthographic projection rectangle of the camera's projection
near The near frustum plane distance of the camera's projection
far The far frustum plane distance of the camera's projection

Definition at line 139 of file LookAtCamera.cs.

References Mindshifter.LookAtCamera.mEyePosition, Mindshifter.LookAtCamera.mLookAtPosition, Mindshifter.LookAtCamera.mProjection, Mindshifter.LookAtCamera.mRequiresUpdate, and Mindshifter.LookAtCamera.Projection.


Member Function Documentation

void Mindshifter.LookAtCamera.BuildMatrix (  )  [private]

Builds the camera's view matrix based on its eye point and look at point using the unit Y vector as the up direction.

Definition at line 153 of file LookAtCamera.cs.

References Mindshifter.LookAtCamera.mEyePosition, Mindshifter.LookAtCamera.mLookAtPosition, Mindshifter.LookAtCamera.mRequiresUpdate, and Mindshifter.LookAtCamera.mViewMatrix.

Referenced by Mindshifter.LookAtCamera.Update().

void Mindshifter.LookAtCamera.Update ( float  elapsedSeconds  ) 

Performs any required updates to the camera's values based on the specified elapsed time.

Parameters:
elapsedSeconds The elapsed time in seconds since the last call to Update()

Implements Mindshifter.ICamera.

Definition at line 163 of file LookAtCamera.cs.

References Mindshifter.LookAtCamera.BuildMatrix(), and Mindshifter.LookAtCamera.mRequiresUpdate.

Ray Mindshifter.LookAtCamera.GetPickRay ( Vector2  position,
Viewport  viewport 
)

Returns a world space ray cast from the specified screen projected position.

Parameters:
position The position in screen space to cast a ray from
viewport The viewport through which to unproject the specified position

Implements Mindshifter.ICamera.

Definition at line 174 of file LookAtCamera.cs.

References Mindshifter.LookAtCamera.ProjectionMatrix, and Mindshifter.LookAtCamera.ViewMatrix.


Member Data Documentation

Matrix Mindshifter.LookAtCamera.mViewMatrix [private]

Definition at line 13 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.BuildMatrix().

Projection Mindshifter.LookAtCamera.mProjection [private]

Definition at line 14 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.LookAtCamera().

Vector3 Mindshifter.LookAtCamera.mEyePosition [private]

Definition at line 16 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.BuildMatrix(), and Mindshifter.LookAtCamera.LookAtCamera().

Vector3 Mindshifter.LookAtCamera.mLookAtPosition [private]

Definition at line 17 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.BuildMatrix(), and Mindshifter.LookAtCamera.LookAtCamera().

bool Mindshifter.LookAtCamera.mRequiresUpdate [private]

Definition at line 19 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.BuildMatrix(), Mindshifter.LookAtCamera.LookAtCamera(), and Mindshifter.LookAtCamera.Update().


Property Documentation

Matrix Mindshifter.LookAtCamera.ViewMatrix [get]

Gets the camera's view matrix.

Implements Mindshifter.ICamera.

Definition at line 25 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.GetPickRay().

Matrix Mindshifter.LookAtCamera.ProjectionMatrix [get]

Gets the camera's projection matrix.

Implements Mindshifter.ICamera.

Definition at line 39 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.GetPickRay().

Projection Mindshifter.LookAtCamera.Projection [get]

Gets the camera's projection.

Definition at line 47 of file LookAtCamera.cs.

Referenced by Mindshifter.LookAtCamera.LookAtCamera().

BoundingFrustum Mindshifter.LookAtCamera.Frustum [get]

Gets the camera's bounding frustum.

Implements Mindshifter.ICamera.

Definition at line 55 of file LookAtCamera.cs.

Vector3 Mindshifter.LookAtCamera.Position [get, set]

Gets or sets the camera's eye position.

Implements Mindshifter.ICamera.

Definition at line 63 of file LookAtCamera.cs.

Vector3 Mindshifter.LookAtCamera.LookAtPosition [get, set]

Gets or sets the camera's look at position.

Definition at line 76 of file LookAtCamera.cs.


The documentation for this class was generated from the following file:
Generated on Mon Mar 31 03:29:21 2008 for Cameras by  doxygen 1.5.1-p1