Enki::Matrix22 Struct Reference
[Some software bricks extracted from the An support library.]

#include <Geometry.h>

List of all members.


Detailed Description

A 2x2 matrix.

Notation of values and constructor order arguments are column based:

        a c
        b d


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.
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.

Public Attributes

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


The documentation for this struct was generated from the following file:
Generated on Sun Mar 1 03:10:09 2009 for Enki by  doxygen 1.5.1