CSIBCMatrix4x4 Class Reference
Class representing matricies with 4 rows, and 4 columns.
More...#include <SIBCMatrix.h>
List of all members.
|
|
Public Member Functions
|
| |
CSIBCMatrix4x4 () |
| |
CSIBCMatrix4x4 (const CSIBCMatrix4x4 &i_Matrix) |
| |
CSIBCMatrix4x4 (SI_Float *i_pMatrix) |
| SI_Error |
Set (const CSIBCMatrix4x4 &i_Matrix) |
| SI_Error |
Set (const SI_Float *i_pMatrix) |
| SI_Error |
Set (const SI_Byte i_bIndex, SI_Float i_fValue) |
| SI_Error |
Set (const SI_Byte i_Column, const SI_Byte i_Row, const SI_Float i_fValue) |
| void |
SetToScale (const CSIBCVector3D &i_vScale) |
| void |
SetToRotation (const CSIBCVector3D &i_vEuler) |
| void |
SetToRotation (const SI_Float angl, const CSIBCVector3D &axis) |
| void |
SetToTranslation (const CSIBCVector3D &i_vTrans) |
| void |
SetTransforms (const CSIBCVector3D &scale, const CSIBCVector3D &rot, const CSIBCVector3D &trans) |
| void |
SetScaling (const CSIBCVector3D &i_vScaling) |
| void |
SetRotation (const CSIBCVector3D &i_vRot) |
| void |
SetRotation (const CSIBCMatrix4x4 &i_mMatrix) |
| void |
SetOrientation (const CSIBCVector3D &x_axis, const CSIBCVector3D &y_axis, const CSIBCVector3D &z_axis) |
| void |
SetTranslation (const CSIBCVector3D &i_vTrans) |
| SI_Error |
Get (SI_Float *o_pMatrix) const |
| SI_Error |
Get (CSIBCMatrix4x4 &o_mMatrix) const |
| SI_Float |
Get (const SI_Byte i_bIndex) const |
| SI_Float |
Get (const SI_Byte i_Column, const SI_Byte i_Row) const |
| void |
GetScaling (CSIBCVector3D &o_vScale) const |
| void |
GetRotation (CSIBCVector3D &o_vRot) const |
| void |
GetOrientation (CSIBCVector3D &x_axis, CSIBCVector3D &y_axis, CSIBCVector3D &z_axis) const |
| void |
GetTranslation (CSIBCVector3D &o_vTrans) const |
| void |
GetTransforms (CSIBCVector3D &scale, CSIBCVector3D &rot, CSIBCVector3D &trans) |
| SI_Bool |
IsIdentity () |
| SI_Bool |
GetInverse (CSIBCMatrix4x4 &o_mMatrix) |
| CSIBCMatrix4x4 & |
Normalize () |
| CSIBCMatrix4x4 & |
SetNull () |
| CSIBCMatrix4x4 & |
SetIdentity () |
| CSIBCMatrix4x4 & |
Transpose () |
| void |
ColumnMajor (SI_Float *o_pMatrix) |
| void |
RowMajor (SI_Float *) |
| SI_Float * |
Raw () |
| SI_Matrix * |
GetSIMatrix () |
| void |
LookAt (const CSIBCVector3D &pos, const CSIBCVector3D &target, const CSIBCVector3D &up, const SI_Float roll) |
| void |
Ortho (const SI_Float left, const SI_Float right, const SI_Float top, const SI_Float bottom, const SI_Float nearPlane, const SI_Float farPlane) |
| void |
Perspective (const SI_Float nearPlane, const SI_Float farPlane, const SI_Float fov, const SI_Float aspect) |
| void |
PerspectiveAlt (const SI_Float nearPlane, const SI_Float farPlane, const SI_Float fov, const SI_Float aspect) |
| SI_Bool |
AlignAxes (CSIBCVector3D *x_vec, CSIBCVector3D *xy_vec) |
| SI_Bool |
AlignRoll (SI_Float in_Roll, CSIBCVector3D *in_pVector) |
| CSIBCMatrix4x4 & |
Multiply (CSIBCMatrix4x4 &i_mMatrix) |
| SI_Error |
Multiply (CSIBCMatrix4x4 &i_mMatrix, CSIBCMatrix4x4 &result) |
| CSIBCMatrix4x4 & |
Multiply4x3 (const CSIBCMatrix4x4 &i_mMatrix) |
| SI_Error |
Multiply4x3 (const CSIBCMatrix4x4 &i_mMatrix, CSIBCMatrix4x4 &result) const |
| CSIBCVector4D |
Multiply (const CSIBCVector2D &i_vVector) const |
| CSIBCVector4D |
Multiply (const CSIBCVector3D &i_vVector) |
| CSIBCVector4D |
Multiply (const CSIBCVector4D &i_vVector) |
| void |
Multiply (CSIBCVector3D &i_vResult, const CSIBCVector3D &i_vVector) |
| void |
MultiplyLeft (CSIBCVector3D &i_vResult, const CSIBCVector3D &i_vVector) const |
| CSIBCMatrix4x4 |
operator * (CSIBCMatrix4x4 &i_mMatrix) |
| CSIBCVector4D |
operator * (CSIBCVector2D &i_vVector) |
| CSIBCVector4D |
operator * (CSIBCVector3D &i_vVector) |
| CSIBCVector4D |
operator * (CSIBCVector4D &i_vVector) |
| CSIBCMatrix4x4 & |
operator= (const CSIBCMatrix4x4 &i_mMatrix) |
| CSIBCMatrix4x4 & |
operator+= (const CSIBCMatrix4x4 &i_mMatrix) |
| SI_Error |
Dump () |
| SI_Error |
SelfTest () |
Detailed Description
Class representing matricies with 4 rows, and 4 columns.
CSIBCMatrix4x4 objects store values in column-major order (the form which C/C++ stores them). In fact, the data values for the matrix stored within the object are represented with a SI_Matrix, which is a typedef for a 4x4 C matrix (this is true except on the Playstation 2). Special optimizations for this class are made on the Playstation 2 to use the VU processor.
This class uses double precision floating point numbers to store element values. There exists three other matrix classes, CSIBCMatrix44d, CSIBCMatrix33d and CSIBCMatrixMNd. They are used to represent 4x4 matricies with double precision floating-point numbers, 3x3 matricies with double precision floating-point numbers, and MxN matricies with double precision floating-point numbers, respectively.
Constructor & Destructor Documentation
Default constructor. Sets the matrix to the identity matrix.
Copy constructor. Sets the matrix to be identical to the i_Matrix matrix.
- Parameters:
-
| [in] |
i_Matrix |
The matrix to copy values for the new matrix from. |
Constructor. Sets the matrix values to those contained in the i_pMatrix array. The array should be in column-major form. That is, [row][column] matches with i_pMatrix[column*4 + row].
- Parameters:
-
| [in] |
i_pMatrix |
Array of 16 SI_Float values in column-major form to set the new matrix to. |
- See also:
- CSIBCMatrix4x4::Set(const SI_Float *)
Member Function Documentation
Sets the values in this matrix to the values in the i_Matrix matrix.
- Parameters:
-
| [in] |
i_Matrix |
The matrix to set this matrix's values to. |
- Return values:
-
| SI_Error Set |
( |
const SI_Float * |
i_pMatrix |
) |
|
Sets the matrix values to those contained in the i_pMatrix array. The array should be in column-major form. That is, [row][column] matches with i_pMatrix[column*4 + row].
- Parameters:
-
| [in] |
i_pMatrix |
Array of 16 SI_Float values in column-major form to set the matrix to. |
- Return values:
-
- Example:
- Example of setting a matrix
SIBCMatrix4x4 * t_mMyMatrix = new SIBCMatrix();
GLfloat t_fModelView[16];
glGetFloatv(GL_MODELVIEW_MATRIX, t_fModelView);
t_mMyMatrix->Set((SI_Float *)t_fModelView);
D3DXMATRIX t_mView;
m_pDevice->GetTransform(D3DTS_VIEW, &t_mView);
t_mMyMatrix->Set((SI_Float *)t_mView);
- See also:
- CSIBCMatrix4x4::CSIBCMatrix4x4(const SI_Float *)
| SI_Error Set |
( |
const SI_Byte |
i_bIndex, |
|
|
|
SI_Float |
i_fValue |
|
|
|
) |
|
|
|
Sets the value at i_bIndex to i_fValue. The index is a column-major index of the item to set.
- Parameters:
-
| [in] |
i_bIndex |
The column-major index of the item to set. |
| [in] |
i_fValue |
The value to set the element to. |
- Return values:
-
- See also:
- CSIBCMatrix4x4::Set(const SI_Byte, const SI_Byte, SI_Float)
CSIBCMatrix4x4::Get(const SI_Byte)
| SI_Error Set |
( |
const SI_Byte |
i_Column, |
|
|
|
const SI_Byte |
i_Row, |
|
|
|
const SI_Float |
i_fValue |
|
|
|
) |
|
|
|
Sets the value at row i_Row and column i_Column to i_fValue.
- Parameters:
-
| [in] |
i_Column |
The column of the item to set. |
| [in] |
i_Row |
The row of the item to set. |
| [in] |
i_fValue |
The value to set the element to. |
- Return values:
-
- See also:
- CSIBCMatrix4x4::Set(const SI_Byte, SI_Float)
CSIBCMatrix4x4::Get(const SI_Byte, const SI_Byte)
Sets this matrix to a scaling matrix, whose X, Y and Z values are obtained from the X, Y and Z components of the i_vScale vector. This function replaces the current matrix.
- Parameters:
-
| [in] |
i_vScale |
The vector containing the X, Y and Z scaling factors for the matrix. |
- See also:
- CSIBCMatrix4x4::GetScaling
CSIBCMatrix4x4::SetScaling
CSIBCMatrix4x4::SetTransforms
Sets this matrix to a rotation matrix, determined by the euler angles supplied in i_vEuler vector. The euler angle convention used is the "xyz" convention (better known as the pitch-roll-yaw angles). This function replaces the current matrix.
- Parameters:
-
| [in] |
i_vEuler |
The euler angles to compute the values for this matrix. X is 'pitch', Y is 'roll' and Z is 'yaw'. |
- See also:
- CSIBCMatrix4x4::SetRotation
CSIBCMatrix4x4::GetRotation
CSIBCMatrix4x4::SetTransforms
| void SetToRotation |
( |
const SI_Float |
angl, |
|
|
|
const CSIBCVector3D & |
axis |
|
|
|
) |
|
|
|
Sets this matrix to a rotation matrix, determined by a counter-clockwise rotation of angl radians, about an axis axis. This function replaces the current matrix.
- Parameters:
-
| [in] |
angl |
The angle of counter-clockwise rotation (in radians) about the axis. |
| [in] |
axis |
The vector representing the axis in which to rotate about. |
Sets this matrix to a translation matrix, determined by the vector i_vTrans, containing the amount of translation in each axis. This function replaces the current matrix.
- Parameters:
-
| [in] |
i_vTrans |
Vector containing translations. |
Sets this matrix with euler rotation, scale, and translation transformations produced from the rot, scale, and trans vectors respectively. This function sets the current matrix to a rotation matrix with the rot parameter (equivalent to what gets produced from CSIBCMatrix4x4::SetToRotation), then applies a scaling to the matrix, and then applies the transformation. However, it is not the equivalent of matrix multiplication, the translation is not scaled. This function replaces the current matrix.
- Parameters:
-
| [in] |
scale |
Vector representing the scaling in the X, Y and Z directions. |
| [in] |
rot |
Vector representing the euler rotation angles (pitch, roll, yaw). |
| [in] |
trans |
Vector representing the translations in the X, Y and Z directions. |
- See also:
- CSIBCMatrix4x4::SetToRotation
CSIBCMatrix4x4::SetToScale
CSIBCMatrix4x4::SetToTranslation
- Example:
- Example of using SetTransforms
CSIBCMatrix4x4 t_mMatrix1, t_mMatrix2, t_mMatrix3, t_mMatrixProd, t_mMatrixTransforms;
CSIBCVector3D t_vScale, t_vRot, t_vTrans;
t_vScale = CSIBCVector3D(2.0f, 4.0f, 1.0f);
t_vRot = CSIBCVector3D(M_PI_4, M_PI_4, M_PI_4);
t_vTrans = CSIBCVector3D(10.0f, -10.0f, 5.0f);
t_mMatrix1.SetToRotation(t_vRot);
t_mMatrix2.SetToScale(t_vScale);
t_mMatrix3.SetToTranslation(t_vTrans);
t_mMatrixProd = t_mMatrix1 * t_mMatrix2 * t_mMatrix3;
t_mMatrixTransforms.SetTransforms(t_vScale, t_vRot, t_vTrans);
Sets the scaling factor in X, Y and Z directions, using the values from the corresponding components in the i_vScaling vector. This function first normalizes the scaling of the current matrix, and then scales the matrix by the given amount.
- Parameters:
-
| [in] |
i_vScaling |
Vector representing the desired scaling in X, Y and Z. |
- See also:
- CSIBCMatrix4x4::SetToScale
CSIBCMatrix4x4::GetScaling
- Example:
- Example of using SetScaling
Sets the rotation in the matrix to the euler rotation given by the angles in i_vRot (as pitch-roll-yaw). The scaling and transformation of the matrix are kept constant. For more efficiency, if a rotation matrix has already been computed, use CSIBCMatrix4x4::SetRotation( const CSIBCMatrix4x4 &).
- Parameters:
-
| [in] |
i_vRot |
The euler rotation angles to set the rotation of this matrix to (as pitch-roll-yaw angles). |
- See also:
- CSIBCMatrix4x4::SetRotation(const CSIBCMatrix4x4 &)
CSIBCMatrix4x4::GetRotation
CSIBCMatrix4x4::GetTransforms
CSIBCMatrix4x4::SetToRotation
- Example:
- Example using SetRotation
CSIBCMatrix4x4 t_mMatrix;
CSIBCVector3D t_vTrans, t_vScale, t_vRot;
CSIBCVector3D t_vTrans2, t_vScale2, t_vRot2;
t_vTrans = CSIBCVector3D(1.5f, 2.5f, 0.25f);
t_vScale = CSIBCVector3D(500.0f, 0.01f, 500.0f);
t_vRot = CSIBCVector3D(M_PI_4, M_PI_4, M_PI_4);
t_mMatrix.SetTransforms(t_vScale, t_vRot, t_vTrans);
t_vRot = CSIBCVector3D(M_PI, M_PI_4, M_PI);
t_mMatrix.SetRotation(t_vRot);
t_mMatrix.GetTransforms(t_vScale2, t_vRot2, t_vTrans2);
printf("t_vScale == t_vScale2 = %s\n", (t_vScale == t_vScale2) ? "TRUE", "FALSE);
printf("t_vRot == t_vRot2 = %s\n", (t_vRot == t_vRot2) ? "TRUE", "FALSE);
printf("t_vTrans == t_vTrans2 = %s\n", (t_vTrans == t_vTrans2) ? "TRUE", "FALSE);
Sets the rotation in the matrix to the rotation given by the rotation matrixin i_mMatrix. The scaling and transformation of the matrix are kept constant. This function is more efficient than its counterpart, CSIBCMatrix4x4::SetRotation( const CSIBCVector3D &), if a rotation matrix has already been computed.
- Parameters:
-
| [in] |
i_mMatrix |
Rotation matrix containing the desired rotation for this matrix. |
- See also:
- CSIBCMatrix4x4::SetRotation( const CSIBCVector3D &)
CSIBCMatrix4x4::SetToRotation
CSIBCMatrix4x4::GetRotation
Sets the rotation in the matrix to the rotation defined by the three axes given by the parameters x_axis, y_axis and z_axis. The scaling and translation of the matrix are kept constant. This function is similar in functionality to CSIBCMatrix4x4::SetRotation, with different parameters, and is more efficient than CSIBCMatrix4x4::SetRotation( const CSIBCVector3D &).
- Parameters:
-
| [in] |
x_axis |
Normalized vector to use as the x-axis of the desired rotation. |
| [in] |
y_axis |
Normalized vector to use as the y-axis of the desired rotation. |
| [in] |
z_axis |
Normalized vector to use as the z-axis of the desired rotation. |
- See also:
- CSIBCMatrix4x4::GetOrientation
CSIBCMatrix4x4::GetRotation
CSIBCMatrix4x4::SetRotation
CSIBCMatrix4x4::SetToRotation
Set the translation in the matrix to the translation in the X, Y and Z directions given by the components of the vector i_vTrans. The scaling and rotation of the matrix is kept constant.
- Parameters:
-
| [in] |
i_vTrans |
The vector representing the desired translation in the X, Y and Z directions. |
- See also:
- CSIBCMatrix4x4::GetTranslation
CSIBCMatrix4x4::SetToTranslation
| SI_Error Get |
( |
SI_Float * |
o_pMatrix |
) |
const |
Returns the entire matrix into an array of 16 SI_Float values (in column-major order).
- Parameters:
-
| [out] |
o_pMatrix |
Allocated array of 16 SI_Float, to receive the matrix values. |
- Return values:
-
- See also:
- CSIBCMatrix4x4::Raw
Returns the entire matrix into another CSIBCMatrix4x4 object. The values inside o_mMatrix are overwritten with the values from this matrix.
- Parameters:
-
| [out] |
o_mMatrix |
Matrix to receive the values from this matrix. |
- Return values:
-
- See also:
- CSIBCMatrix4x4::operator=
| SI_Float Get |
( |
const SI_Byte |
i_bIndex |
) |
const |
Returns the value at the specified index. The index is a column-major index of the item to get.
- Parameters:
-
| [in] |
i_bIndex |
The column-major index of the item to get. |
- Returns:
- The value of the item at the given index.
- See also:
- CSIBCMatrix4x4::Set(const SI_Byte, SI_Float)
| SI_Float Get |
( |
const SI_Byte |
i_Column, |
|
|
|
const SI_Byte |
i_Row |
|
|
|
) |
|
|
const |
Returns the value at the specified row-column juncture.
- Parameters:
-
| [in] |
i_Column |
The column of the item to get. |
| [in] |
i_Row |
The row of the item to get. |
- Returns:
- The value of the item at the given index.
- See also:
- CSIBCMatrix4x4::Set(const SI_Byte, const SI_Byte, const SI_Float)
Returns the scaling components for this matrix in the X, Y and Z directions.
- Parameters:
-
| [out] |
o_vScale |
Vector to receive the scaling components for this matrix. |
- See also:
- CSIBCMatrix4x4::SetScaling
Returns the euler rotation angles for this matrix (as pitch-roll-yaw angles).
- Parameters:
-
| [out] |
o_vRot |
Vector to receive the euler rotation angles for this matrix. |
- See also:
- CSIBCMatrix4x4::SetRotation( const CSIBCVector3D & )
Returns the orientation axes for the rotation of this matrix.
- Parameters:
-
| [in] |
x_axis |
Receives the x-axis of the rotation for this matrix. |
| [in] |
y_axis |
Receives the y-axis of the rotation for this matrix. |
| [in] |
z_axis |
Receives the z-axis of the rotation for this matrix. |
- See also:
- CSIBCMatrix4x4::SetOrientation
CSIBCMatrix4x4::GetRotation
Returns the translation for this matrix.
- Parameters:
-
| [out] |
o_vTrans |
Receives the translation in the X, Y and Z directions for this matrix. |
- See also:
- CSIBCMatrix4x4::SetTranslation
CSIBCMatrix4x4::SetToTranslation
Returns the scaling, rotation, and translation of the current matrix. This is equivalent to calling CSIBCMatrix4x4::GetScaling, CSIBCMatrix4x4::GetRotation and CSIBCMatrix4x4::GetTranslation, with the corresponding inputs.
- Parameters:
-
| [out] |
scale |
Receives the scaling of this matrix in the X, Y and Z directions. |
| [out] |
rot |
Receives the euler angle rotations of this matrix (in pitch-roll-yaw angles). |
| [out] |
trans |
Receives the translation of this matrix in the X, Y and Z directions. |
- See also:
- CSIBCMatrix4x4::SetTransforms
CSIBCMatrix4x4::GetScaling
CSIBCMatrix4x4::GetRotation
CSIBCMatrix4x4::GetTranslation
Determines whether this matrix is the identity matrix.
- Return values:
-
Computes the inverse of this matrix, and stores it in o_mMatrix. The contents of o_mMatrix are overwritten in this process.
- Parameters:
-
| [out] |
o_mMatrix |
Receives the inverse of this matrix. |
- Return values:
-
|
|
SI_Bool::TRUE |
if the inverse can be computed (o_mMatrix contains the inverse), |
|
|
SI_Bool::FALSE |
otherwise (the contents of o_mMatrix are unchanged). |
Not implemented.
Sets each value in the matrix to zero.
- Returns:
- Reference to this matrix.
- See also:
- CSIBCMatrix4x4::SetIdentity
Sets the matrix to the identity matrix.
- Returns:
- Reference to this matrix.
- See also:
- CSIBCMatrix4x4::IsIdentity
CSIBCMatrix4x4::SetNull
Sets this matrix to be its transpose matrix.
- Returns:
- Reference to this matrix.
| void ColumnMajor |
( |
SI_Float * |
o_pMatrix |
) |
|
Copies the contents of this matrix into the 16 SI_Float array o_pMatrix in column major order. This method is equivalent in functionality to SIBCMatrix4x4::Get(SI_Float *).
- Parameters:
-
| [out] |
o_pMatrix |
Array of 16 SI_Float values to receive the contents of this matrix. |
- See also:
- CSIBCMatrix4x4::Get(SI_Float *)
CSIBCMatrix4x4::Raw
CSIBCMatrix4x4::RowMajor
| void RowMajor |
( |
SI_Float * |
|
) |
|
Copies the contents of this matrix into the 16 SI_Float output array in row major order.
- See also:
- CSIBCMatrix4x4::ColumnMajor
Returns a pointer to the raw data of the matrix (16 SI_Float values in column major order). The pointer received from this function should not be freed, and modification to the values in the array directly modify this matrix object.
- Returns:
- Array of 16 SI_Float values containing the contents of this matrix.
- See also:
- CSIBCMatrix4x4::GetSIMatrix
CSIBCMatrix4x4::ColumnMajor
CSIBCMatrix4x4::Get(SI_Float *)
Returns a pointer to the SI_Matrix containing the data used internally by this matrix object. The pointer received from this function should not be freed, and modification to the values within directly modify this matrix object.
- Returns:
- Pointer to the SI_Matrix containing the values for this matrix object.
Computes the camera positioning matrix, such that the camera is located at position pos, it pointing at target. The up vector of the camera is given by up, and the camera is rotated about the position-target vector an angle of roll counter-clockwise from the up vector. This call replaces the current matrix.
- Parameters:
-
| [in] |
pos |
The desired position of the camera, in world coordinates. |
| [in] |
target |
The desired interest point of the camera, in world coordinates. |
| [in] |
up |
The up vector of the camera. |
| [in] |
roll |
The counter-clockwise roll angle (in degrees) from the up vector about the position-target vector. |
| void Ortho |
( |
const SI_Float |
left, |
|
|
|
const SI_Float |
right, |
|
|
|
const SI_Float |
top, |
|
|
|
const SI_Float |
bottom, |
|
|
|
const SI_Float |
nearPlane, |
|
|
|
const SI_Float |
farPlane |
|
|
|
) |
|
|
|
Computes an orthogonal projection matrix. This call replaces the current matrix.
- Parameters:
-
| [in] |
left |
The left boundary of the viewing plane. |
| [in] |
right |
The right boundary of the viewing plane. |
| [in] |
top |
The top boundary of the viewing plane. |
| [in] |
bottom |
The bottom boundary of the viewing plane. |
| [in] |
nearPlane |
The distance of the near clipping plane from the viewing position. |
| [in] |
farPlane |
The distance of the far clipping plane from the viewing position. |
- See also:
- CSIBCMatrix4x4::Perspective
CSIBCMatrix4x4::PerspectiveAlt
| void Perspective |
( |
const SI_Float |
nearPlane, |
|
|
|
const SI_Float |
farPlane, |
|
|
|
const SI_Float |
fov, |
|
|
|
const SI_Float |
aspect |
|
|
|
) |
|
|
|
Computes a perspective projection matrix. This call produces a perspective projection matrix compatible with OpenGL projection matricies. To produce a matrix that it compatible with Direct3D, use CSIBCMatrix4x4::PerspectiveAlt. This call replaces the current matrix.
- Parameters:
-
| [in] |
nearPlane |
The distance of the near clipping plane from the viewing position. |
| [in] |
farPlane |
The distance of the far clipping plane from the viewing position. |
| [in] |
fov |
The half field-of-view angle in radians. The actual view angle is double this value. |
| [in] |
aspect |
The aspect ratio (width/height) for the perspective matrix. |
- See also:
- CSIBCMatrix4x4::PerspectiveAlt
CSIBCMatrix4x4::Ortho
| void PerspectiveAlt |
( |
const SI_Float |
nearPlane, |
|
|
|
const SI_Float |
farPlane, |
|
|
|
const SI_Float |
fov, |
|
|
|
const SI_Float |
aspect |
|
|
|
) |
|
|
|
Computes a perspective projection matrix. This call produces a perspective projection matrix compatible with Direct3D projection matricies. To produce a matrix that it compatible with OpenGL, use CSIBCMatrix4x4::Perspective. This call replaces the current matrix.
- Parameters:
-
| [in] |
nearPlane |
The distance of the near clipping plane from the viewing position. |
| [in] |
farPlane |
The distance of the far clipping plane from the viewing position. |
| [in] |
fov |
The half field-of-view angle in radians. The actual view angle is double this value. |
| [in] |
aspect |
The aspect ratio (width/height) for the perspective matrix. |
- See also:
- CSIBCMatrix4x4::Perspective
CSIBCMatrix4x4::Ortho
Computes a rotation matrix where the x-axis is given by the vector x_vec, the y-axis lies in the plane defined by the x_vec and xy_vec vectors, and the z-axis is the cross-product between x_vec and xy_vec. This call replaces the current matrix.
- Parameters:
-
| [in] |
x_vec |
Pointer to the vector to use as the x-axis of the rotation matrix. |
| [in] |
xy_vec |
Pointer to the vector to define the plane (along with x_vec) in which the y-axis lies. |
- Return values:
-
|
|
SI_Bool::TRUE |
if the rotation matrix was computed properly, this matrix contains the new rotation matrix. |
|
|
SI_Bool::FALSE |
otherwise, this matrix contains the identity matrix. |
- See also:
- CSIBCMatrix4x4::AlignRoll
| SI_Bool AlignRoll |
( |
SI_Float |
in_Roll, |
|
|
|
CSIBCVector3D * |
in_pVector |
|
|
|
) |
|
|
|
Computes a rotation matrix which is pointing along the vector in_pVector, with a roll angle of in_Roll. This call replaces the current matrix.
- Parameters:
-
| [in] |
in_Roll |
The roll angle (in radians) for the rotation matrix. |
| [in] |
in_pVector |
Pointer to the vector defining the desired rotation of the new matrix. |
- Return values:
-
- See also:
- CSIBCMatrix4x4::AlignAxes
Replaces this matrix with the matrix-product between this matrix and i_mMatrix. This matrix is right-multiplied by the input matrix, thus the operation is as follows: Mthis' = Mthis * Minput.
- Parameters:
-
| [in] |
i_mMatrix |
The matrix to multiply this matrix by. |
- Returns:
- Reference to this matrix.
- See also:
- CSIBCMatrix4x4::Multiply(CSIBCMatrix4x4&, CSIBCMatrix4x4&)
CSIBCMatrix4x4::operator*(CSIBCMatrix4x4&)
Computes the matrix-product between this matrix and i_mMatrix. This matrix is right-multiplied by the input matrix, thus the operation is as follows: Mout = Mthis * Minput.
- Parameters:
-
| [in] |
i_mMatrix |
The matrix to multiply this matrix by. |
| [out] |
result |
Reference to the matrix to store the multiplication results. |
- Return values:
-
- See also:
- CSIBCMatrix4x4::Multiply(CSIBCMatrix4x4&)
CSIBCMatrix4x4::operator*(CSIBCMatrix4x4&)
Replaces this matrix with the matrix-product between this matrix and i_mMatrix. The last column of the matrix is not computed, and is set to (0,0,0,1). This matrix is right-multiplied by the input matrix, thus the operation is as follows: Mthis' = Mthis * Minput.
- Parameters:
-
| [in] |
i_mMatrix |
The matrix to multiply this matrix by. |
- Returns:
- Reference to this matrix.
- See also:
- CSIBCMatrix4x4::Multiply4x3(const CSIBCMatrix4x4&, CSIBCMatrix4x4&)
CSIBCMatrix4x4::Multiply(CSIBCMatrix4x4 &)
Computes the matrix-product between this matrix and i_mMatrix. The last column of the matrix is not computed, and is set to (0,0,0,1). This matrix is right-multiplied by the input matrix, thus the operation is as follows: Mout = Mthis * Minput.
- Parameters:
-
| [in] |
i_mMatrix |
The matrix to multiply this matrix by. |
| [out] |
result |
Reference to the matrix to store the multiplication results. |
- Return values:
-
- See also:
- CSIBCMatrix4x4::Multiply4x3(const CSIBCMatrix4x4&)
CSIBCMatrix4x4::Multiply(CSIBCMatrix4x4 &)
Computes the matrix-product between this matrix and the row vector i_vVector. The Z and W values of the vector (to make the multiplication possible) are assumed to be 0.0f and 1.0f, respectively. The vector is right-multiplied by this matrix, thus the operation is as follows: Vout = Vin * Mthis.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
- Returns:
- Resulting vector from the multiplication.
- See also:
- CSIBCMatrix4x4::Multiply(const CSIBCVector3D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector4D&)
CSIBCMatrix4x4::operator*(CSIBCVector2D &)
Computes the matrix-product between this matrix and the row vector i_vVector. The W value of the vector (to make the multiplication possible) is assumed to be 1.0f. The vector is right-multiplied by this matrix thus the operation is as follows: Vout = Vin * Mthis.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
- Returns:
- Resulting vector from the multiplication.
- See also:
- CSIBCMatrix4x4::Multiply(const CSIBCVector2D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector4D&)
CSIBCMatrix4x4::Multiply(CSIBCVector3D&, const CSIBCVector3D&)
CSIBCMatrix4x4::MultiplyLeft
CSIBCMatrix4x4::operator*(CSIBCVector3D&)
Computes the matrix-product between this matrix and the row vector i_vVector. The vector is right-multiplied by this matrix thus the operation is as follows: Vout = Vin * Mthis.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
- Returns:
- Resulting vector from the multiplication.
- See also:
- CSIBCMatrix4x4::Multiply(const CSIBCVector2D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector3D&)
CSIBCMatrix4x4::operator*(CSIBCVector4D&)
Computes the matrix-product between this matrix and the row vector i_vVector. The W value of the vector (to make the multiplication possible) is assumed to be 1.0f. The vector is right-multiplied by this matrix thus the operation is as follows: Vout = Vin * Mthis.
- Note:
- Only the
X, Y and Z values of the resultant vector are given in the result i_vResult.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
| [in] |
i_vResult |
Resulting vector from the multiplication. |
- See also:
- CSIBCMatrix4x4::MultiplyLeft
CSIBCMatrix4x4::Multiply(const CSIBCVector2D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector3D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector4D&)
Computes the matrix-product between this matrix and the column vector i_vVector. The W value of the vector (to make the multiplication possible) is assumed to be 1.0f. The vector is left-multiplied by this matrix thus the operation is as follows: Vout = Mthis * Vin.
- Note:
- Only the
X, Y and Z values of the resulting vector are given in the result i_vResult.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
| [in] |
i_vResult |
Resultant vector from the multiplication. |
- See also:
- CSIBCMatrix4x4::Multiply(CSIBCVector3D&, const CSIBCVector3D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector2D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector3D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector4D&)
Computes the matrix-product between this matrix and i_mMatrix. This matrix is right-multiplied by the input matrix, thus the operation is as follows: Mout = Mthis * Minput.
- Parameters:
-
| [in] |
i_mMatrix |
The matrix to multiply this matrix by. |
- Returns:
- Resulting matrix multiplication.
- See also:
- CSIBCMatrix4x4::Multiply(CSIBCMatrix4x4&, CSIBCMatrix4x4&)
CSIBCMatrix4x4::Multiply(CSIBCMatrix4x4&)
Computes the matrix-product between this matrix and the row vector i_vVector. The Z and W values of the vector (to make the multiplication possible) are assumed to be 0.0f and 1.0f, respectively. The vector is right-multiplied by this matrix, thus the operation is as follows: Vout = Vin * Mthis.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
- Returns:
- Resulting vector from the multiplication.
- See also:
- CSIBCMatrix4x4::Multiply(const CSIBCVector2D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector3D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector4D&)
Computes the matrix-product between this matrix and the row vector i_vVector. The W value of the vector (to make the multiplication possible) is assumed to be 1.0f. The vector is right-multiplied by this matrix thus the operation is as follows: Vout = Vin * Mthis.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
- Returns:
- Resulting vector from the multiplication.
- See also:
- CSIBCMatrix4x4::Multiply(const CSIBCVector2D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector3D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector4D&)
CSIBCMatrix4x4::Multiply(CSIBCVector3D&, const CSIBCVector3D&)
CSIBCMatrix4x4::MultiplyLeft
Computes the matrix-product between this matrix and the row vector i_vVector. The vector is right-multiplied by this matrix thus the operation is as follows: Vout = Vin * Mthis.
- Parameters:
-
| [in] |
i_vVector |
Row vector to multiply with this matrix. |
- Returns:
- Resulting vector from the multiplication.
- See also:
- CSIBCMatrix4x4::Multiply(const CSIBCVector2D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector3D&)
CSIBCMatrix4x4::Multiply(const CSIBCVector4D&)
CSIBCMatrix4x4::operator*(CSIBCVector4D&)
Assigns the values in i_mMatrix to this matrix.
- Parameters:
-
| [in] |
i_mMatrix |
Matrix to copy data from. |
- Returns:
- Reference to this matrix.
- See also:
- CSIBCMatrix4x4::Set
CSIBCMatrix4x4::operator+=
Adds this matrix and i_mMatrix and stores the result in this matrix.
- Parameters:
-
| [in] |
i_mMatrix |
Matrix to add this matrix to. |
- Returns:
- Reference to this matrix.
- See also:
- CSIBCMatrix4x4::operator=
CSIBCMatrix4x4::Multiply
Not implemented yet.
Not implemented yet.
The documentation for this class was generated from the following file: