Inherits Mindshifter.ICamera.
Inheritance diagram for Mindshifter.QuaternionCamera:
Public Member Functions | |
QuaternionCamera () | |
Creates a new instance of QuaternionCamera with a position at the origin 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. | |
QuaternionCamera (Vector3 position, Quaternion orientation) | |
Creates a new instance of QuaternionCamera with the specified position and orientation 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. | |
QuaternionCamera (Vector3 position, Quaternion orientation, float fov, float aspect, float near, float far) | |
Creates a new instance of QuaternionCamera with a position at the origin using a perspective projection with the specified projection parameters. | |
QuaternionCamera (Vector3 position, Quaternion orientation, Rectangle rect, float near, float far) | |
Creates a new instance of QuaternionCamera with a psotion at the origin using an orthographic projection with the specified projection parameters. | |
void | Pitch (float pitchAmount, TransformSpace space) |
Pitches the camera's orientation (x axis rotation). | |
void | Pitch (float pitchAmount) |
Pitches the camera's orientation in camera space (x axis rotation). | |
void | Yaw (float yawAmount, TransformSpace space) |
Yaws the camera's orientation (y axis rotation). | |
void | Yaw (float yawAmount) |
Yaws the camera's orientation in camera space (y axis rotation). | |
void | Roll (float rollAmount, TransformSpace space) |
Rolls the camera's orientation (z axis rotation). | |
void | Roll (float rollAmount) |
Rolls the camera's orientation in camera space (z axis rotation). | |
void | Translate (Vector3 amount, TransformSpace space) |
Translates the camera's position by the specified vector. | |
void | Translate (Vector3 amount) |
Translates the camera's position by the specified vector in camera space. | |
void | TranslateX (float amount, TransformSpace space) |
Translates the camera's x position by the specified amount. | |
void | TranslateX (float amount) |
Translates the camera's x position by the specified amount in camera space. | |
void | TranslateY (float amount, TransformSpace space) |
Translates the camera's y position by the specified amount. | |
void | TranslateY (float amount) |
Translates the camera's y position by the specified amount in camera space. | |
void | TranslateZ (float amount, TransformSpace space) |
Translates the camera's z position by the specified amount. | |
void | TranslateZ (float amount) |
Translates the camera's z position by the specified amount in camera space. | |
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 | InverseViewMatrix [get] |
Gets the camera's inverse view matrix. | |
Matrix | ProjectionMatrix [get] |
Gets the camera's projection matrix. | |
Projection | Projection [get] |
Gets the camera's projection. | |
Vector3 | Position [get, set] |
Gets or sets the camera's position. | |
Quaternion | Orientation [get, set] |
Gets or sets the camera's orientation. | |
float | X [get, set] |
Gets or sets the camera's world X position. | |
float | Y [get, set] |
Gets or sets the camera's world Y position. | |
float | Z [get, set] |
Gets or sets the camera's world Z position. | |
Vector3 | Up [get] |
Gets the camera's up vector. | |
Vector3 | Forward [get] |
Gets the camera's forward vector. | |
Vector3 | Right [get] |
Gets the camera's right vector. | |
BoundingFrustum | Frustum [get] |
Gets the camera's bounding frustum. | |
Private Member Functions | |
void | BuildMatrix () |
Builds the camera's view matrix. | |
Private Attributes | |
Matrix | mViewMatrix |
Matrix | mInverseViewMatrix |
Projection | mProjection |
Vector3 | mPosition |
Quaternion | mOrientation |
bool | mRequiresUpdate |
Definition at line 20 of file QuaternionCamera.cs.
Mindshifter.QuaternionCamera.QuaternionCamera | ( | ) |
Creates a new instance of QuaternionCamera with a position at the origin 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 196 of file QuaternionCamera.cs.
Mindshifter.QuaternionCamera.QuaternionCamera | ( | Vector3 | position, | |
Quaternion | orientation | |||
) |
Creates a new instance of QuaternionCamera with the specified position and orientation 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.
position | The position of the camera's eye point | |
orientation | The orientation of the camera |
Definition at line 209 of file QuaternionCamera.cs.
Mindshifter.QuaternionCamera.QuaternionCamera | ( | Vector3 | position, | |
Quaternion | orientation, | |||
float | fov, | |||
float | aspect, | |||
float | near, | |||
float | far | |||
) |
Creates a new instance of QuaternionCamera with a position at the origin using a perspective projection with the specified projection parameters.
position | The position of the camera's eye point | |
orientation | The orientation of the camera | |
fov | The camera's perspective projection field of view | |
aspect | The camera's perspective projection aspect ratio | |
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 225 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mOrientation, Mindshifter.QuaternionCamera.mPosition, Mindshifter.QuaternionCamera.mProjection, Mindshifter.QuaternionCamera.mRequiresUpdate, Mindshifter.QuaternionCamera.mViewMatrix, and Mindshifter.QuaternionCamera.Projection.
Mindshifter.QuaternionCamera.QuaternionCamera | ( | Vector3 | position, | |
Quaternion | orientation, | |||
Rectangle | rect, | |||
float | near, | |||
float | far | |||
) |
Creates a new instance of QuaternionCamera with a psotion at the origin using an orthographic projection with the specified projection parameters.
position | The position of the camera's eye point | |
orientation | The orientation of the camera | |
rect | The camera's orthographic projection rectangle | |
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 247 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mOrientation, Mindshifter.QuaternionCamera.mPosition, Mindshifter.QuaternionCamera.mProjection, Mindshifter.QuaternionCamera.mRequiresUpdate, Mindshifter.QuaternionCamera.mViewMatrix, and Mindshifter.QuaternionCamera.Projection.
void Mindshifter.QuaternionCamera.Pitch | ( | float | pitchAmount, | |
TransformSpace | space | |||
) |
Pitches the camera's orientation (x axis rotation).
pitchAmount | The angle to pitch the camera's orientation (in radians) | |
space | The vector space in which to perform the transform |
Definition at line 265 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mOrientation, and Mindshifter.QuaternionCamera.mRequiresUpdate.
Referenced by Mindshifter.QuaternionCamera.Pitch().
void Mindshifter.QuaternionCamera.Pitch | ( | float | pitchAmount | ) |
Pitches the camera's orientation in camera space (x axis rotation).
pitchAmount | The angle to pitch the camera's orientation (in radians) |
Definition at line 288 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.Pitch().
void Mindshifter.QuaternionCamera.Yaw | ( | float | yawAmount, | |
TransformSpace | space | |||
) |
Yaws the camera's orientation (y axis rotation).
yawAmount | The angle to yaw the camera's orientation (in radians) | |
space | The vector space in which to perform the transform |
Definition at line 298 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mOrientation, and Mindshifter.QuaternionCamera.mRequiresUpdate.
Referenced by Mindshifter.QuaternionCamera.Yaw().
void Mindshifter.QuaternionCamera.Yaw | ( | float | yawAmount | ) |
Yaws the camera's orientation in camera space (y axis rotation).
yawAmount | The angle to yaw the camera's orientation (in radians) |
Definition at line 321 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.Yaw().
void Mindshifter.QuaternionCamera.Roll | ( | float | rollAmount, | |
TransformSpace | space | |||
) |
Rolls the camera's orientation (z axis rotation).
rollAmount | The angle to roll the camera's orientation (in radians) | |
space | The vector space in which to perform the transform |
Definition at line 331 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mOrientation, and Mindshifter.QuaternionCamera.mRequiresUpdate.
Referenced by Mindshifter.QuaternionCamera.Roll().
void Mindshifter.QuaternionCamera.Roll | ( | float | rollAmount | ) |
Rolls the camera's orientation in camera space (z axis rotation).
rollAmount | The angle to roll the camera's orientation (in radians) |
Definition at line 354 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.Roll().
void Mindshifter.QuaternionCamera.Translate | ( | Vector3 | amount, | |
TransformSpace | space | |||
) |
Translates the camera's position by the specified vector.
amount | The amount by which to translate the camera's position | |
space | The vector space in which to perform the transform |
Definition at line 364 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mPosition, and Mindshifter.QuaternionCamera.mRequiresUpdate.
Referenced by Mindshifter.QuaternionCamera.Translate().
void Mindshifter.QuaternionCamera.Translate | ( | Vector3 | amount | ) |
Translates the camera's position by the specified vector in camera space.
amount | The amount by which to translate the camera's position |
Definition at line 388 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.Translate().
void Mindshifter.QuaternionCamera.TranslateX | ( | float | amount, | |
TransformSpace | space | |||
) |
Translates the camera's x position by the specified amount.
amount | The amount by which to translate the camera's x position | |
space | The vector space in which to perform the transform |
Definition at line 398 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mPosition, and Mindshifter.QuaternionCamera.mRequiresUpdate.
Referenced by Mindshifter.QuaternionCamera.TranslateX().
void Mindshifter.QuaternionCamera.TranslateX | ( | float | amount | ) |
Translates the camera's x position by the specified amount in camera space.
amount | The amount by which to translate the camera's x position |
Definition at line 421 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.TranslateX().
void Mindshifter.QuaternionCamera.TranslateY | ( | float | amount, | |
TransformSpace | space | |||
) |
Translates the camera's y position by the specified amount.
amount | The amount by which to translate the camera's y position | |
space | The vector space in which to perform the transform |
Definition at line 431 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mPosition, and Mindshifter.QuaternionCamera.mRequiresUpdate.
Referenced by Mindshifter.QuaternionCamera.TranslateY().
void Mindshifter.QuaternionCamera.TranslateY | ( | float | amount | ) |
Translates the camera's y position by the specified amount in camera space.
amount | The amount by which to translate the camera's y position |
Definition at line 454 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.TranslateY().
void Mindshifter.QuaternionCamera.TranslateZ | ( | float | amount, | |
TransformSpace | space | |||
) |
Translates the camera's z position by the specified amount.
amount | The amount by which to translate the camera's z position | |
space | The vector space in which to perform the transform |
Definition at line 464 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mPosition, and Mindshifter.QuaternionCamera.mRequiresUpdate.
Referenced by Mindshifter.QuaternionCamera.TranslateZ().
void Mindshifter.QuaternionCamera.TranslateZ | ( | float | amount | ) |
Translates the camera's z position by the specified amount in camera space.
amount | The amount by which to translate the camera's z position |
Definition at line 487 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.TranslateZ().
void Mindshifter.QuaternionCamera.BuildMatrix | ( | ) | [private] |
Builds the camera's view matrix.
Definition at line 495 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.mInverseViewMatrix, Mindshifter.QuaternionCamera.mOrientation, Mindshifter.QuaternionCamera.mPosition, Mindshifter.QuaternionCamera.mRequiresUpdate, and Mindshifter.QuaternionCamera.mViewMatrix.
Referenced by Mindshifter.QuaternionCamera.Pitch(), Mindshifter.QuaternionCamera.Roll(), Mindshifter.QuaternionCamera.Translate(), Mindshifter.QuaternionCamera.TranslateX(), Mindshifter.QuaternionCamera.TranslateY(), Mindshifter.QuaternionCamera.TranslateZ(), Mindshifter.QuaternionCamera.Update(), and Mindshifter.QuaternionCamera.Yaw().
void Mindshifter.QuaternionCamera.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 518 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.BuildMatrix(), and Mindshifter.QuaternionCamera.mRequiresUpdate.
Ray Mindshifter.QuaternionCamera.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 529 of file QuaternionCamera.cs.
References Mindshifter.QuaternionCamera.ProjectionMatrix, and Mindshifter.QuaternionCamera.ViewMatrix.
Matrix Mindshifter.QuaternionCamera.mViewMatrix [private] |
Definition at line 22 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.BuildMatrix(), and Mindshifter.QuaternionCamera.QuaternionCamera().
Matrix Mindshifter.QuaternionCamera.mInverseViewMatrix [private] |
Definition at line 23 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.Pitch(), Mindshifter.QuaternionCamera.QuaternionCamera(), Mindshifter.QuaternionCamera.Roll(), Mindshifter.QuaternionCamera.Translate(), Mindshifter.QuaternionCamera.TranslateX(), Mindshifter.QuaternionCamera.TranslateY(), Mindshifter.QuaternionCamera.TranslateZ(), and Mindshifter.QuaternionCamera.Yaw().
Definition at line 25 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.QuaternionCamera().
Vector3 Mindshifter.QuaternionCamera.mPosition [private] |
Definition at line 27 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.QuaternionCamera(), Mindshifter.QuaternionCamera.Translate(), Mindshifter.QuaternionCamera.TranslateX(), Mindshifter.QuaternionCamera.TranslateY(), and Mindshifter.QuaternionCamera.TranslateZ().
Quaternion Mindshifter.QuaternionCamera.mOrientation [private] |
Definition at line 28 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.Pitch(), Mindshifter.QuaternionCamera.QuaternionCamera(), Mindshifter.QuaternionCamera.Roll(), and Mindshifter.QuaternionCamera.Yaw().
bool Mindshifter.QuaternionCamera.mRequiresUpdate [private] |
Definition at line 30 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.BuildMatrix(), Mindshifter.QuaternionCamera.Pitch(), Mindshifter.QuaternionCamera.QuaternionCamera(), Mindshifter.QuaternionCamera.Roll(), Mindshifter.QuaternionCamera.Translate(), Mindshifter.QuaternionCamera.TranslateX(), Mindshifter.QuaternionCamera.TranslateY(), Mindshifter.QuaternionCamera.TranslateZ(), Mindshifter.QuaternionCamera.Update(), and Mindshifter.QuaternionCamera.Yaw().
Matrix Mindshifter.QuaternionCamera.ViewMatrix [get] |
Gets the camera's view matrix.
Implements Mindshifter.ICamera.
Definition at line 36 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.GetPickRay().
Matrix Mindshifter.QuaternionCamera.InverseViewMatrix [get] |
Matrix Mindshifter.QuaternionCamera.ProjectionMatrix [get] |
Gets the camera's projection matrix.
Implements Mindshifter.ICamera.
Definition at line 64 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.GetPickRay().
Projection Mindshifter.QuaternionCamera.Projection [get] |
Gets the camera's projection.
Definition at line 72 of file QuaternionCamera.cs.
Referenced by Mindshifter.QuaternionCamera.QuaternionCamera().
Vector3 Mindshifter.QuaternionCamera.Position [get, set] |
Gets or sets the camera's position.
Implements Mindshifter.ICamera.
Definition at line 80 of file QuaternionCamera.cs.
Quaternion Mindshifter.QuaternionCamera.Orientation [get, set] |
float Mindshifter.QuaternionCamera.X [get, set] |
float Mindshifter.QuaternionCamera.Y [get, set] |
float Mindshifter.QuaternionCamera.Z [get, set] |
Vector3 Mindshifter.QuaternionCamera.Up [get] |
Vector3 Mindshifter.QuaternionCamera.Forward [get] |
Vector3 Mindshifter.QuaternionCamera.Right [get] |
BoundingFrustum Mindshifter.QuaternionCamera.Frustum [get] |
Gets the camera's bounding frustum.
Implements Mindshifter.ICamera.
Definition at line 187 of file QuaternionCamera.cs.