Inherits Mindshifter.ICamera.
Inheritance diagram for Mindshifter.LookAtCamera:
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 |
Definition at line 11 of file LookAtCamera.cs.
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.
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.
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.
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.
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.
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.
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.
Matrix Mindshifter.LookAtCamera.mViewMatrix [private] |
Definition at line 13 of file LookAtCamera.cs.
Referenced by Mindshifter.LookAtCamera.BuildMatrix().
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().
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] |