#include <CeylanHomogeneousMatrix3.h>


Public Types | |
| enum | TextOutputFormat { rawText, html } |
| Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
| HomogeneousMatrix3 (const Maths::Linear::Matrix2 &r, const Maths::Linear::Vector2 &v) | |
| Constructs an homogeneous 3x3 matrix from r, a 2x2 rotation matrix, and from t, a 2D translation vector. | |
| HomogeneousMatrix3 (AngleInDegrees angle, const Maths::Linear::Vector2 &v) | |
| Constructs an homogeneous 3x3 matrix whose 2x2 matrix corresponds to a rotation of angle in trigonometrical sens (direction) with t as a 2D translation vector. | |
| HomogeneousMatrix3 (Real r0=0, Real r1=0, Real r2=0, Real r3=0, Real t0=0, Real t1=0) | |
| Constructs a new homogenous 3x3 matrix with specified elements. | |
| virtual | ~HomogeneousMatrix3 () throw () |
| Copy constructor. | |
| virtual const std::string | toString (VerbosityLevels level=high) const |
| Returns a user-friendly description of the state of this object. | |
| virtual void | setTo (Real x0=0, Real x1=0, Real x2=0, Real y0=0, Real y1=0, Real y2=0, Real z0=0, Real z1=0, Real z2=0) |
| Reassigns all matrix elements. | |
| virtual void | setColumn (MatrixIndex columnNumber, const Vector3 &newColumn) |
| Reassigns specified column of this matrix. | |
| virtual void | setAllElementsTo (Real commonValue) |
| Sets this matrix so that all its elements equal commonValue. | |
| virtual Real | getElementAt (MatrixIndex abscissa, MatrixIndex ordinate) const |
| Returns indexed element. | |
| virtual void | setElementAt (MatrixIndex abscissa, MatrixIndex ordinate, Real newValue) |
| Sets indexed element to specified value. | |
| virtual void | setToIdentity () |
| Sets this matrix to the identity matrix. | |
| virtual void | setToDiagonal (Real diagonalTerm) |
| Sets this matrix to the a diagonal matrix whose diagonal term is diagonalTerm. | |
| virtual void | transpose () |
| Tranposes this matrix. | |
| virtual Real | trace () const |
| Computes this matrix's trace. | |
| virtual Real | determinant () const |
| Computes this matrix's determinant. | |
| virtual void | nullify () |
| Sets this matrix to the null matrix (all elements zeroed). | |
Static Public Member Functions | |
| static Matrix3 | Cofactor (const Matrix3 &m) |
| Returns the cofactor matrix. | |
| static Matrix3 | Adjoint (const Matrix3 &m) |
| Returns the adjoint matrix. | |
| template<typename T > | |
| static Matrix3 | CreateFrom (T endomorphism) |
| Returns the matrix corresponding to specified endomorphism. | |
| static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
| Returns a user-friendly description of this list of pointers to text displayable instances. | |
| static TextOutputFormat | GetOutputFormat () |
| Returns the current overall text format to be used by TextDisplayable instances. | |
| static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
| Sets the current overall text format to be used by TextDisplayable instances. | |
Static Public Attributes | |
| static const MatrixIndex | Dimensions = 3 |
| Tells what is the dimension for this Matrix. | |
Protected Member Functions | |
| virtual void | setBottomRow () |
| Creates the camera matrix in a 2D world, whose focal length and center of interest are specified. | |
| virtual void | setTranslationVector (const Vector2 &v) |
| Sets the embedded translation vector of this homogeneous matrix. | |
| virtual void | setRotationMatrix (const Matrix2 &m) |
| Sets the embedded rotation matrix of this homogeneous matrix. | |
| virtual void | setInCanonicalForm () |
| Sets this homogeneous matrix in its canonical form, where bottom-right element is 1. | |
Protected Attributes | |
| Real | _mat [Dimensions][Dimensions] |
| The nine coordinates of this matrix. | |
Static Protected Attributes | |
| static TextOutputFormat | _OutputFormat = rawText |
| The text format to be used currently by TextDisplayable instances. | |
Friends | |
| CEYLAN_DLL friend HomogeneousMatrix3 | operator* (const HomogeneousMatrix3 &hm1, const HomogeneousMatrix3 &hm2) |
| Multiplies efficiently two homogeneous matrices: HomogeneousMatrix3 result = m1 * m2. | |
| CEYLAN_DLL friend Vector2 | operator* (const HomogeneousMatrix3 &hm, const Vector2 &v) |
| Multiplies an homogeneous 3x3 matrix by a 2D vector, returning another 2D vector: Vector2 result = hm3 * v2. | |
Definition at line 106 of file CeylanHomogeneousMatrix3.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
| HomogeneousMatrix3::HomogeneousMatrix3 | ( | const Maths::Linear::Matrix2 & | r, | |
| const Maths::Linear::Vector2 & | v | |||
| ) |
Constructs an homogeneous 3x3 matrix from r, a 2x2 rotation matrix, and from t, a 2D translation vector.
Definition at line 61 of file CeylanHomogeneousMatrix3.cc.
References setBottomRow(), setRotationMatrix(), and setTranslationVector().
| HomogeneousMatrix3::HomogeneousMatrix3 | ( | AngleInDegrees | angle, | |
| const Maths::Linear::Vector2 & | v | |||
| ) |
Constructs an homogeneous 3x3 matrix whose 2x2 matrix corresponds to a rotation of angle in trigonometrical sens (direction) with t as a 2D translation vector.
| angle | in degrees. |
Definition at line 97 of file CeylanHomogeneousMatrix3.cc.
References Ceylan::Maths::Linear::Matrix2::CreateFromRotation(), setBottomRow(), setRotationMatrix(), and setTranslationVector().
| HomogeneousMatrix3::HomogeneousMatrix3 | ( | Real | r0 = 0, |
|
| Real | r1 = 0, |
|||
| Real | r2 = 0, |
|||
| Real | r3 = 0, |
|||
| Real | t0 = 0, |
|||
| Real | t1 = 0 | |||
| ) | [explicit] |
Constructs a new homogenous 3x3 matrix with specified elements.
This matrix can be seen as the following block matrix: [ r, t; 0, 1 ], where r = [ r0, r1; r2, r3 ] is a 2x2 matrix and t = [ t0; t1 ] a 2D vector.
Definition at line 77 of file CeylanHomogeneousMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and setBottomRow().
| HomogeneousMatrix3::~HomogeneousMatrix3 | ( | ) | throw () [virtual] |
Copy constructor.
Definition at line 109 of file CeylanHomogeneousMatrix3.cc.
Returns the adjoint matrix.
Definition at line 339 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::Cofactor(), and Ceylan::Maths::Linear::Matrix3::transpose().
Returns the cofactor matrix.
Definition at line 301 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat.
Referenced by Ceylan::Maths::Linear::Matrix3::Adjoint().
| static Matrix3 Ceylan::Maths::Linear::Matrix3::CreateFrom | ( | T | endomorphism | ) | [inline, static, inherited] |
Returns the matrix corresponding to specified endomorphism.
| endomorphism | can be a functor (ex: Endomorphism3DFunctor) or a simple function: Vector3 -> Vector3. |
Definition at line 357 of file CeylanMatrix3.h.
References Ceylan::Maths::Linear::Matrix3::setColumn(), and Ceylan::Maths::Linear::Vector3::setTo().
| Real Matrix3::determinant | ( | ) | const [virtual, inherited] |
Computes this matrix's determinant.
Implements Ceylan::Maths::Linear::Matrix.
Definition at line 227 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat.
Referenced by Ceylan::Maths::Linear::operator!().
| Real Matrix3::getElementAt | ( | MatrixIndex | abscissa, | |
| MatrixIndex | ordinate | |||
| ) | const [virtual, inherited] |
Returns indexed element.
Index ranges from 0 to Dimensions-1 for both dimensions.
| MathsException | if index is out of bounds and if in debug mode. |
Implements Ceylan::Maths::Linear::Matrix.
Definition at line 140 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and Ceylan::Maths::Linear::Matrix3::Dimensions.
Referenced by Ceylan::Locatable2D::getCenter().
| TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), toString(), and Ceylan::Maths::Linear::Bipoint::toString().
| void Matrix::nullify | ( | ) | [virtual, inherited] |
Sets this matrix to the null matrix (all elements zeroed).
Definition at line 53 of file CeylanMatrix.cc.
References Ceylan::Maths::Linear::Matrix::setAllElementsTo().
| void Matrix3::setAllElementsTo | ( | Real | commonValue | ) | [virtual, inherited] |
Sets this matrix so that all its elements equal commonValue.
Implements Ceylan::Maths::Linear::Matrix.
Definition at line 129 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and Ceylan::Maths::Linear::Matrix3::Dimensions.
| void HomogeneousMatrix3::setBottomRow | ( | ) | [protected, virtual] |
Creates the camera matrix in a 2D world, whose focal length and center of interest are specified.
Sets the bottom row of the homogenous matrix to all zero but a final one.
Definition at line 182 of file CeylanHomogeneousMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat.
Referenced by HomogeneousMatrix3().
| void Matrix3::setColumn | ( | MatrixIndex | columnNumber, | |
| const Vector3 & | newColumn | |||
| ) | [virtual, inherited] |
Reassigns specified column of this matrix.
Definition at line 118 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, Ceylan::Maths::Linear::Vector3::_vec, and Ceylan::Maths::Linear::Matrix3::Dimensions.
Referenced by Ceylan::Maths::Linear::Matrix3::CreateFrom().
| void Matrix3::setElementAt | ( | MatrixIndex | abscissa, | |
| MatrixIndex | ordinate, | |||
| Real | newValue | |||
| ) | [virtual, inherited] |
Sets indexed element to specified value.
Index ranges from 0 to Dimensions-1 for both dimensions.
| MathsException | if index is out of bounds and if in debug mode. |
Implements Ceylan::Maths::Linear::Matrix.
Definition at line 157 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and Ceylan::Maths::Linear::Matrix3::Dimensions.
Referenced by Ceylan::Locatable2D::setCenter().
| void HomogeneousMatrix3::setInCanonicalForm | ( | ) | [protected, virtual] |
Sets this homogeneous matrix in its canonical form, where bottom-right element is 1.
| LinearException | if bottom-right element is zero. |
Definition at line 217 of file CeylanHomogeneousMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, Dimensions, and Ceylan::Maths::IsNull().
| void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
| newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
| void HomogeneousMatrix3::setRotationMatrix | ( | const Matrix2 & | m | ) | [protected, virtual] |
Sets the embedded rotation matrix of this homogeneous matrix.
Assigns specified Matrix2 on top-left position.
Definition at line 205 of file CeylanHomogeneousMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and Ceylan::Maths::Linear::Matrix2::getElementAt().
Referenced by HomogeneousMatrix3().
| void Matrix3::setTo | ( | Real | x0 = 0, |
|
| Real | x1 = 0, |
|||
| Real | x2 = 0, |
|||
| Real | y0 = 0, |
|||
| Real | y1 = 0, |
|||
| Real | y2 = 0, |
|||
| Real | z0 = 0, |
|||
| Real | z1 = 0, |
|||
| Real | z2 = 0 | |||
| ) | [virtual, inherited] |
Reassigns all matrix elements.
Definition at line 100 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat.
| void Matrix3::setToDiagonal | ( | Real | diagonalTerm | ) | [virtual, inherited] |
Sets this matrix to the a diagonal matrix whose diagonal term is diagonalTerm.
Implements Ceylan::Maths::Linear::Matrix.
Definition at line 183 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and Ceylan::Maths::Linear::Matrix3::Dimensions.
Referenced by Ceylan::Maths::Linear::Matrix3::setToIdentity().
| void Matrix3::setToIdentity | ( | ) | [virtual, inherited] |
Sets this matrix to the identity matrix.
Reimplemented from Ceylan::Maths::Linear::Matrix.
Definition at line 174 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::setToDiagonal().
| void HomogeneousMatrix3::setTranslationVector | ( | const Vector2 & | v | ) | [protected, virtual] |
Sets the embedded translation vector of this homogeneous matrix.
Assigns specified Vector2 to the top of last column.
Definition at line 195 of file CeylanHomogeneousMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and Ceylan::Maths::Linear::Vector2::getElementAt().
Referenced by HomogeneousMatrix3().
| const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
| Ceylan::VerbosityLevels | level = Ceylan::high | |||
| ) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
| displayables | a list of pointers to TextDisplayable instances/ | |
| level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
| const string HomogeneousMatrix3::toString | ( | VerbosityLevels | level = high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
| level | the requested verbosity level. |
Reimplemented from Ceylan::Maths::Linear::Matrix3.
Definition at line 118 of file CeylanHomogeneousMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, Ceylan::DigitOutputPrecision, Dimensions, Ceylan::Log::LogPlug::error(), Ceylan::TextDisplayable::GetOutputFormat(), Ceylan::TextDisplayable::html, and Ceylan::toString().
| Real Matrix3::trace | ( | ) | const [virtual, inherited] |
Computes this matrix's trace.
Implements Ceylan::Maths::Linear::Matrix.
Definition at line 213 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, and Ceylan::Maths::Linear::Matrix3::Dimensions.
| void Matrix3::transpose | ( | ) | [virtual, inherited] |
Tranposes this matrix.
Implements Ceylan::Maths::Linear::Matrix.
Definition at line 194 of file CeylanMatrix3.cc.
References Ceylan::Maths::Linear::Matrix3::_mat, Ceylan::Maths::Linear::Matrix3::Dimensions, and generalUtils::temp.
Referenced by Ceylan::Maths::Linear::Matrix3::Adjoint().
| CEYLAN_DLL friend Vector2 operator* | ( | const HomogeneousMatrix3 & | hm, | |
| const Vector2 & | v | |||
| ) | [friend] |
Multiplies an homogeneous 3x3 matrix by a 2D vector, returning another 2D vector: Vector2 result = hm3 * v2.
| CEYLAN_DLL friend HomogeneousMatrix3 operator* | ( | const HomogeneousMatrix3 & | hm1, | |
| const HomogeneousMatrix3 & | hm2 | |||
| ) | [friend] |
Multiplies efficiently two homogeneous matrices: HomogeneousMatrix3 result = m1 * m2.
Real Ceylan::Maths::Linear::Matrix3::_mat[Dimensions][Dimensions] [protected, inherited] |
The nine coordinates of this matrix.
Definition at line 392 of file CeylanMatrix3.h.
Referenced by Ceylan::Maths::Linear::Matrix3::Cofactor(), Ceylan::Maths::Linear::Matrix3::determinant(), Ceylan::Maths::Linear::Matrix3::getElementAt(), HomogeneousMatrix3(), Ceylan::Maths::Linear::Matrix3::Matrix3(), Ceylan::Maths::Linear::Matrix3::setAllElementsTo(), setBottomRow(), Ceylan::Maths::Linear::Matrix3::setColumn(), Ceylan::Maths::Linear::Matrix3::setElementAt(), setInCanonicalForm(), setRotationMatrix(), Ceylan::Maths::Linear::Matrix3::setTo(), Ceylan::Maths::Linear::Matrix3::setToDiagonal(), setTranslationVector(), Ceylan::Maths::Linear::Matrix3::toString(), toString(), Ceylan::Maths::Linear::Matrix3::trace(), and Ceylan::Maths::Linear::Matrix3::transpose().
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().
const MatrixIndex Ceylan::Maths::Linear::HomogeneousMatrix3::Dimensions = 3 [static] |
Tells what is the dimension for this Matrix.
Reimplemented from Ceylan::Maths::Linear::Matrix3.
Definition at line 234 of file CeylanHomogeneousMatrix3.h.
Referenced by setInCanonicalForm(), and toString().
1.5.8