Main Page Modules Class Hierarchy Alphabetical List Compound List Compound Members
CSIBCRotMatd Class Reference
Representation of a 3X3 rotation matrix.
More...
#include <SIBCRotMatd.h>
Inheritance diagram for CSIBCRotMatd::
List of all members.Public Methods
- CSIBCRotMatd (void)
- CSIBCRotMatd (const CSIBCVector3Dd &in_vct0, const CSIBCVector3Dd &in_vct1, const CSIBCVector3Dd &in_vct2, const bool in_bAreRows=true)
- CSIBCRotMatd (const double in_dA00, const double in_dA01, const double in_dA02, const double in_dA10, const double in_dA11, const double in_dA12, const double in_dA20, const double in_dA21, const double in_dA22)
- double Get (const int in_nRow, const int in_nCol) const
- CSIBCRotMatd & Set (int in_nRow, int in_nCol, const double in_dVal)
- CSIBCRotMatd & Set (double in_dVal[3][3])
- CSIBCRotMatd & Set (const CSIBCMatrix33d &in_mat)
- CSIBCRotMatd & Set (const CSIBCRotMatd &in_mat)
- CSIBCRotMatd & Set (const E3DAxisType in_axis, const double in_dAngle)
- CSIBCRotMatd & SetRow (const int in_nRow, const CSIBCVector3Dd &in_vct)
- CSIBCRotMatd & SetRow (const int in_nRow, double in_dA0, double in_dA1, double in_dA2)
- CSIBCRotMatd & SetCol (const int in_nCol, const CSIBCVector3Dd &in_vct)
- CSIBCRotMatd & SetCol (const int in_nCol, double in_dA0, double in_dA1, double in_dA2)
- CSIBCRotMatd & SetNull ()
- CSIBCRotMatd & SetIdentity (void)
- bool operator== (const CSIBCMatrix33d &in_mat) const
- bool operator!= (const CSIBCMatrix33d &in_mat) const
- CSIBCRotMatd & Mul (const CSIBCRotMatd &in_mat1, const CSIBCRotMatd &in_mat2)
- CSIBCRotMatd & Mul (const CSIBCRotMatd &in_mat)
- CSIBCRotMatd & MulTransByReg (const CSIBCRotMatd &in_mat1, const CSIBCRotMatd &in_mat2)
- CSIBCRotMatd & MulRegByTrans (const CSIBCRotMatd &in_mat1, const CSIBCRotMatd &in_mat2)
- CSIBCRotMatd & Negate (const CSIBCRotMatd &in_mat)
- CSIBCRotMatd & Negate ()
- double GetDet (void) const
- double GetTrace (void) const
- CSIBCRotMatd & Transpose (const CSIBCRotMatd &in_mat)
- CSIBCRotMatd & Transpose (void)
- CSIBCRotMatd & Invert (const CSIBCRotMatd &in_mat)
- CSIBCRotMatd & Invert (void)
Friends
- bool AreAlmostEqual (const CSIBCRotMatd &in_mat1, const CSIBCRotMatd &in_mat2, const double in_dEpsilon=PICO_EPS)
Detailed Description
Representation of a 3X3 rotation matrix.
CSIBCRotMatd is a specialzed 3X3 matrix that represents rotations. It uses double precision-floating point numbers to represent elements in the matrix.
There are several other classes which represent rotations, most notably CSIBCRotationd, which represents a general rotation class, not specific to matricies, quaternions (see CSIBCQuaternion and CSIBCQuaterniond), etc. Several useful functions for rotations can be found in Utility functions for angles and rotations.
There are several other matrix classes aswell. Classes with specific applications, such as CSIBCXfoMatd used for representing transformation matricies, Other matrix classes are not as specialized as CSIBCRotMatd or CSIBCXfoMatd, and are used to represent general matricies. These classes include CSIBCMatrix4x4, CSIBCMatrix44d and CSIBCMartrix33d.
Constructor & Destructor Documentation
CSIBCRotMatd::CSIBCRotMatd |
( |
void |
|
) |
|
|
|
Default Constructor. Constructs a rotation matrix representing the identity rotation (meaning no rotation at all). -
See also:
-
CSIBCRotMatd::SetIdentity
|
|
Constructor. Sets the rows of the new matrix to be in_vct0 , in_vct1 , and in_vct2 . If in_bAreRows is false, then the input vectors are used as the columns of the new matrix. The user is responsible for ensuring that the vectors given represent a possible rotation matrix (vectors are unit vectors, orthogonal to each other). -
Parameters:
-
in_vct0 |
The vector to use for the first row (or column) of the matrix. |
in_vct1 |
The vector to use for the second row (or column) of the matrix. |
in_vct2 |
The vector to use for the third row (or column) of the matrix. |
in_bAreRows |
Whether the vectors given represent rows or columns of the matrix (true == Rows, false == Columns). Defaults to true (rows). |
|
CSIBCRotMatd::CSIBCRotMatd |
( |
const double |
in_dA00, |
|
|
const double |
in_dA01, |
|
|
const double |
in_dA02, |
|
|
const double |
in_dA10, |
|
|
const double |
in_dA11, |
|
|
const double |
in_dA12, |
|
|
const double |
in_dA20, |
|
|
const double |
in_dA21, |
|
|
const double |
in_dA22 |
|
) |
|
|
|
Constructor. Specifies the value of each element in the new matrix. The user is responsible for ensuring that the elements given represent a possible rotation matrix (rows must represent unit vectors, and be orthogonal to each other). -
Parameters:
-
in_dA00 |
The value for the element in row 1, column 1. |
in_dA01 |
The value for the element in row 1, column 2 |
in_dA02 |
The value for the element in row 1, column 3 |
in_dA10 |
The value for the element in row 2, column 1. |
in_dA11 |
The value for the element in row 2, column 2 |
in_dA12 |
The value for the element in row 2, column 3 |
in_dA20 |
The value for the element in row 3, column 1. |
in_dA21 |
The value for the element in row 3, column 2 |
in_dA22 |
The value for the element in row 3, column 3 |
|
Member Function Documentation
double CSIBCRotMatd::Get |
( |
const int |
in_nRow, |
|
|
const int |
in_nCol |
|
) |
const |
|
|
Returns an element of the marix. -
Parameters:
-
in_nRow |
Row index of the element to retrieve (zero indexed). |
in_nCol |
Column index of the element to retrieve (zero indexed). |
-
Returns:
-
double The value of the element at the given matrix position.
-
See also:
-
CSIBCRotMatd::Set(int, int, const double)
Reimplemented from CSIBCMatrix33d. |
double CSIBCRotMatd::GetDet |
( |
void |
|
) |
const |
|
double CSIBCRotMatd::GetTrace |
( |
void |
|
) |
const |
|
|
Computes the trace of this matrix. A trace is the sum of all the diagonal elements of a matrix. -
Returns:
-
double The trace of this matrix.
-
See also:
-
CSIBCRotMatd::GetDet
Reimplemented from CSIBCMatrix33d. |
CSIBCRotMatd & CSIBCRotMatd::Invert |
( |
void |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::Invert |
( |
const CSIBCRotMatd & |
in_mat |
) |
|
|
|
Sets this matrix to be the inverse of in_mat . -
Parameters:
-
in_mat |
Matrix containing the inverse of the desired matrix. |
-
Returns:
-
bool true if
in_mat could be inverted and the assignment was successful, false otherwise.
-
See also:
-
CSIBCRotMatd::Invert() , CSIBCRotMatd::TransposeInverse
|
CSIBCRotMatd & CSIBCRotMatd::Mul |
( |
const CSIBCRotMatd & |
in_mat |
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::Mul |
( |
const CSIBCRotMatd & |
in_mat1, |
|
|
const CSIBCRotMatd & |
in_mat2 |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::MulRegByTrans |
( |
const CSIBCRotMatd & |
in_mat1, |
|
|
const CSIBCRotMatd & |
in_mat2 |
|
) |
|
|
|
Computes the matrix multiplication of in_mat1 and the transpose of in_mat2 (in_mat1 * in_mat2^T) and stores the result in this matrix. -
Parameters:
-
in_mat1 |
The first matrix in the multiplication (on the left). |
in_mat2 |
The second matrix in the multiplication (on the right), to be transposed before multiplication. |
-
Returns:
-
CSIBCRotMatd& Reference to this matrix.
-
See also:
-
CSIBCRotMatd::Mul , CSIBCRotMatd::MulTransByReg , CSIBCRotMatd::Div
|
CSIBCRotMatd & CSIBCRotMatd::MulTransByReg |
( |
const CSIBCRotMatd & |
in_mat1, |
|
|
const CSIBCRotMatd & |
in_mat2 |
|
) |
|
|
|
Computes the matrix multiplication of the transpose of in_mat1 and in_mat2 (in_mat1^T * in_mat2) and stores the result in this matrix. -
Parameters:
-
in_mat1 |
The first matrix in the multiplication (on the left), to be transposed before multiplication. |
in_mat2 |
The second matrix in the multiplication (on the right). |
-
Returns:
-
CSIBCRotMatd& Reference to this matrix.
-
See also:
-
CSIBCRotMatd::Mul , CSIBCRotMatd::MulRegByTrans , CSIBCRotMatd::Div
|
CSIBCRotMatd & CSIBCRotMatd::Negate |
( |
void |
|
) |
|
|
|
Sets this matrix to its negative. The 'negative' of a matrix is produced by multiplying each element of the matrix by -1. -
Returns:
-
CSIBCRotMatd& Reference to this matrix
-
See also:
-
CSIBCRotMatd::Negate( const CSIBCRotMatd& )
Reimplemented from CSIBCMatrix33d. |
CSIBCRotMatd & CSIBCRotMatd::Negate |
( |
const CSIBCRotMatd & |
in_mat |
) |
|
|
|
Sets this matrix to the negative of in_mat . The 'negative' of a matrix is produced by multiplying each element of the matrix by -1. -
Parameters:
-
in_mat |
Matrix containing the data to set this matrix to the negative of. |
-
Returns:
-
CSIBCRotMatd& Reference to this matrix.
-
See also:
-
CSIBCRotMatd::Negate()
|
CSIBCRotMatd & CSIBCRotMatd::Set |
( |
const E3DAxisType |
in_axis, |
|
|
const double |
in_dAngle |
|
) |
|
|
|
Sets the rotation matrix to be a rotation about the major axis in_axis , of in_dAngle radians. -
Parameters:
-
in_axis |
The major axis for the rotation matrix. |
in_dAngle |
Angle of rotation about the major axis, in radians. \reurn CSIBCRotMatd& Reference to this matrix. |
|
CSIBCRotMatd & CSIBCRotMatd::Set |
( |
const CSIBCRotMatd & |
in_mat |
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::Set |
( |
double |
in_dVal[3][3] |
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::Set |
( |
int |
in_nRow, |
|
|
int |
in_nCol, |
|
|
const double |
in_dVal |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::SetCol |
( |
const int |
in_nCol, |
|
|
double |
in_dA0, |
|
|
double |
in_dA1, |
|
|
double |
in_dA2 |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::SetCol |
( |
const int |
in_nCol, |
|
|
const CSIBCVector3Dd & |
in_vct |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::SetIdentity |
( |
void |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::SetNull |
( |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::SetRow |
( |
const int |
in_nRow, |
|
|
double |
in_dA0, |
|
|
double |
in_dA1, |
|
|
double |
in_dA2 |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::SetRow |
( |
const int |
in_nRow, |
|
|
const CSIBCVector3Dd & |
in_vct |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::Transpose |
( |
void |
|
) |
|
|
CSIBCRotMatd & CSIBCRotMatd::Transpose |
( |
const CSIBCRotMatd & |
in_mat |
) |
|
|
Friends And Related Function Documentation
bool AreAlmostEqual |
( |
const CSIBCRotMatd & |
in_mat1, |
|
|
const CSIBCRotMatd & |
in_mat2, |
|
|
const double |
in_dEpsilon = PICO_EPS |
|
) |
[friend] |
|
|
Determines whether all corresponding elements of the matricies in_mat1 and in_mat2 are equal. Since this method uses floating-point comparison, a threshhold value of in_dEpsilon is used for equality comparison. -
Parameters:
-
in_mat1 |
First matrix for equality comparison. |
in_mat2 |
Second matrix for equality comparison. |
in_dEpsilon |
Floating-point comparison error range. Defaults to PICO_EPS. |
-
Returns:
-
bool true if the matricies are equal, false otherwise.
-
See also:
-
CSIBCMatrix33d::operator== , CSIBCMatrix33d::operator!=
|
The documentation for this class was generated from the following files:
- SIBCRotMatd.h
- SIBCRotMatd.cpp
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.
© Copyright 2001-2003 Avid Technology, Inc. All rights reserved.