Enki  1.9
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members

A 2x2 matrix. More...

#include <Geometry.h>

Public Member Functions

 Matrix22 ()
 Constructor, create matrix with 0.
 
 Matrix22 (double _11, double _21, double _12, double _22)
 Constructor, create matrix with _11 _21 _12 _22.
 
 Matrix22 (double alpha)
 Constructor, create rotation matrix of angle alpha in radian.
 
 Matrix22 (double array[4])
 Constructor, create matrix with array[0] array[1] array[2] array[3].
 
void zeros ()
 Fill with zero.
 
void operator+= (const Matrix22 &v)
 Add matrix v component by component.
 
void operator-= (const Matrix22 &v)
 Substract matrix v component by component.
 
void operator*= (double f)
 Multiply each component by scalar f.
 
void operator/= (double f)
 Divive each component by scalar f.
 
Matrix22 operator+ (const Matrix22 &v) const
 Add matrix v component by component and return the resulting matrix.
 
Matrix22 operator- (const Matrix22 &v) const
 Subtract matrix v component by component and return the resulting matrix.
 
Matrix22 operator* (double f) const
 Multiply each component by scalar f and return the resulting matrix.
 
Matrix22 operator/ (double f) const
 Divide each component by scalar f and return the resulting matrix.
 
Matrix22 transpose () const
 Return the transpose of the matrix.
 
Point operator* (const Point &v) const
 Multiply vector v and return the resulting vector.
 

Static Public Member Functions

static Matrix22 fromDiag (double _1, double _2)
 Creates a diagonal matrix.
 
static Matrix22 identity ()
 Create an identity matrix.
 

Public Attributes

double _11
 11 components
 
double _21
 21 components
 
double _12
 12 components
 
double _22
 22 components
 

Detailed Description

A 2x2 matrix.

Notation of values and constructor order arguments are column based:

a c
b d

The documentation for this struct was generated from the following file: