Cumulia Illustrator Rendering Engine v1.0.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
cil::Matrix2f Class Referencefinal

The Matrix2f class is 2 X 2 matrix. More...

#include <matrix.h>

Inheritance diagram for cil::Matrix2f:
cil::Matrix< Matrix2f > cil::Tuple< float > cil::Variant

Public Member Functions

 Matrix2f ()
 Constructs a 2 X 2 matrix objects, initializing elements on the diagonal to 1 and all others to 0.
 
 Matrix2f (float e00, float e01, float e10, float e11)
 Constructs a 2 X 2 matrix objects, and sets the elements with the input fload parameters.
 
 Matrix2f (const Vector2f &c0, const Vector2f &c1)
 Constructs a 2 X 2 matrix object by setting the vector c0 to the first column and c1 to the second column.
 
 Matrix2f (const Matrix2f &other)
 Constructs a 2 X 2 matrix object by copying the elements of another 2 X 2 matrix.
 
 Matrix2f (const Matrix3f &other)
 Constructs a 2 X 2 matrix object by copying the elements of the 2 X 2 submatrix of another 3 X 3 matrix.
 
 Matrix2f (const Matrix4f &other)
 Constructs a 2 X 2 matrix object by copying the elements of the 2 X 2 submatrix of another 4 X 4 matrix.
 
void set (float e00, float e01, float e10, float e11)
 Sets the elements of this 2 x 2 matrix object.
 
- Public Member Functions inherited from cil::Matrix< Matrix2f >
 Matrix (int dim)
 Constructs a dim X dim Matrix object, initializing elements on the diagonal to 1 and all others to 0.
 
const float * operator[] (int index) const
 Returns a constant pointer to the first element in the column of index of this matrix, providing a read-only access.
 
float * operator[] (int index)
 Returns a pointer to the first element in the column of index of this matrix, providing a read-write access.
 
Matrixoperator+= (const Matrix &other)
 Performs element-wise addition between the current Matrix and another matrix.
 
Matrix< Matrix2f > & operator-= (const Matrix &other)
 Performs element-wise subtraction between the current Matrix and another matrix.
 
Matrix< Matrix2f > & operator*= (const Matrix &other)
 Performs right matrix multiplication of the current matrix with another matrix.
 
Matrix2f operator+ (const Matrix2f &other) const
 Returns a new Matrix object that is formed by element-wise addition between the current matrix and another matrix.
 
Matrix2f operator- (const Matrix2f &other) const
 Returns a new Matrix object that is formed by element-wise subtraction between the current matrix and another matrix.
 
Matrix2f operator* (const Matrix2f &other) const
 Returns a new Matrix object that is formed by matrix multiplication between the current Matrix and another matrix.
 
void setIdentity ()
 Sets elements on the diagonal of this matrix to 1 and all others to 0.
 
void transpose ()
 Transpose this matrix.
 
- Public Member Functions inherited from cil::Tuple< float >
 Tuple (int size)
 Constructs a Tuple object with a specified number of elements, and initialize all elements to 0.
 
virtual ~Tuple ()
 
int size () const
 Gets the number of elements of the Tuple.
 
float * data ()
 Gets the data array of the Tuple.
 
const float * data () const
 Gets the data array of the Tuple, and the data could not be modified upon which this function is called.
 
void setData (const float *data)
 Sets the data array of the Variant.
 
Tuple< float > & operator= (const Tuple &other)
 Copys the data of another Tuple to the one on which the operator is invoked.
 
bool operator== (const Tuple &other) const
 Compares the Tuple with another one, and returns true if they are equal, otherwise returns false.
 
bool operator!= (const Tuple &other) const
 Compares the Tuple with another one, and returns false if they are equal, otherwise returns true.
 
- Public Member Functions inherited from cil::Variant
 Variant ()
 
virtual ~Variant ()
 
const std::string & type () const
 

Additional Inherited Members

- Protected Attributes inherited from cil::Matrix< Matrix2f >
int m_dim
 The dimension of the Matrix.
 
- Protected Attributes inherited from cil::Tuple< float >
float * m_data
 The data array of the Tuple.
 
int m_size
 The number of elements that the data array of the Tuple holds.
 
- Protected Attributes inherited from cil::Variant
std::string m_type
 

Detailed Description

The Matrix2f class is 2 X 2 matrix.

Constructor & Destructor Documentation

◆ Matrix2f() [1/6]

cil::Matrix2f::Matrix2f ( )

Constructs a 2 X 2 matrix objects, initializing elements on the diagonal to 1 and all others to 0.

See also
Matrix(int dim)

◆ Matrix2f() [2/6]

cil::Matrix2f::Matrix2f ( float e00,
float e01,
float e10,
float e11 )

Constructs a 2 X 2 matrix objects, and sets the elements with the input fload parameters.

The first column of the matrix is {e00, e01} and the second column is {e10, e11}.

◆ Matrix2f() [3/6]

cil::Matrix2f::Matrix2f ( const Vector2f & c0,
const Vector2f & c1 )

Constructs a 2 X 2 matrix object by setting the vector c0 to the first column and c1 to the second column.

◆ Matrix2f() [4/6]

cil::Matrix2f::Matrix2f ( const Matrix2f & other)

Constructs a 2 X 2 matrix object by copying the elements of another 2 X 2 matrix.

◆ Matrix2f() [5/6]

cil::Matrix2f::Matrix2f ( const Matrix3f & other)

Constructs a 2 X 2 matrix object by copying the elements of the 2 X 2 submatrix of another 3 X 3 matrix.

◆ Matrix2f() [6/6]

cil::Matrix2f::Matrix2f ( const Matrix4f & other)

Constructs a 2 X 2 matrix object by copying the elements of the 2 X 2 submatrix of another 4 X 4 matrix.

Member Function Documentation

◆ set()

void cil::Matrix2f::set ( float e00,
float e01,
float e10,
float e11 )

Sets the elements of this 2 x 2 matrix object.

The first column of the matrix is {e00, e01} and the second column is {e10, e11}.