Python Script Engine  7.0
GL Studio Editor Python Script API
GlsMatrixAffine Class Reference

Public Member Functions

 GlsMatrixAffine ()
 
virtual ~GlsMatrixAffine ()
 
 GlsMatrixAffine (disti::GlsMatrixAffineD *matrix, bool incEditorRef)
 
 GlsMatrixAffine (GlsMatrixAffine &src)
 
 GlsMatrixAffine (std::vector< double > &data)
 
 GlsMatrixAffine (double m[4][4])
 
 GlsMatrixAffine (double *m)
 
std::vector< double > Data ()
 
void MakeIdentity ()
 
double Determinant ()
 
void Invert ()
 
void Transpose ()
 
bool IsIdentity ()
 
void Rotate (double angle, Vector &centerOfRotation, Vector &axis)
 
void Scale (double x, double y, double z)
 
void Scale (double x, double y, double z, Vector &anchor)
 
void Translate (double x, double y, double z)
 
void Translate (Vector &v)
 
void Transform (Vector &v)
 

Constructor & Destructor Documentation

GlsMatrixAffine::GlsMatrixAffine ( )

default ctor

virtual GlsMatrixAffine::~GlsMatrixAffine ( )
virtual

dtor

GlsMatrixAffine::GlsMatrixAffine ( disti::GlsMatrixAffineD *  matrix,
bool  incEditorRef 
)
GlsMatrixAffine::GlsMatrixAffine ( GlsMatrixAffine src)
GlsMatrixAffine::GlsMatrixAffine ( std::vector< double > &  data)
GlsMatrixAffine::GlsMatrixAffine ( double  m[4][4])

Constructor.

Parameters
ma row-major, two-dimensional array used to initialize the matrix.
GlsMatrixAffine::GlsMatrixAffine ( double *  m)

Constructor.

Parameters
ma a column-major, one-dimensional array containing all values to initialize the matrix with.

Member Function Documentation

std::vector<double> GlsMatrixAffine::Data ( )

Provides access to the raw column-major matrix data as a one dimensional array in a format suitable for Open GL matrix operations.

double GlsMatrixAffine::Determinant ( )

Calculates the determinant of the matrix.

Returns
the calculated value of the determinant.
void GlsMatrixAffine::Invert ( )

Sets this matrix equal to its inverse.

bool GlsMatrixAffine::IsIdentity ( )

Determines if this matrix is equal to the identity matrix.

The identity matrix is I = [Aij], where Aii = 1 and Aij = 0 for i != j. Thus, for the identity matrix, the terms off the main diagonal are all zero, and the terms on the main diagonal are all one.

Returns
true if the matrix is the identity matrix, false otherwise.
void GlsMatrixAffine::MakeIdentity ( )

Set this matrix to the identity matrix.

The identity matrix is I = [Aij], where Aii = 1 and Aij = 0 for i != j. Thus, for the identity matrix, the terms off the main diagonal are all zero, and the terms on the main diagonal are all one.

void GlsMatrixAffine::Rotate ( double  angle,
Vector centerOfRotation,
Vector axis 
)

Perform a rotation transformation around an arbitrary axis using a specified center of rotation, and combine this transformation with the existing matrix data.

Parameters
anglerotation angle in degrees
centerOfRotationpoint to rotate around
axisarbitray axis of rotation
void GlsMatrixAffine::Scale ( double  x,
double  y,
double  z 
)

Perform a scaling transformation using the origin as the anchor point, and combine this transformation with the existing matrix data.

Parameters
xscaling factor in the x direction. 1 = 100% (no scaling change)
yscaling factor in the y direction. 1 = 100% (no scaling change)
zscaling factor in the z direction. 1 = 100% (no scaling change)
void GlsMatrixAffine::Scale ( double  x,
double  y,
double  z,
Vector anchor 
)

Perform a scaling transformation using an arbitrary anchor point, and combine this transformation with the existing matrix data.

Parameters
xscaling factor in the x direction. 1 = 100% (no scaling change)
yscaling factor in the y direction. 1 = 100% (no scaling change)
zscaling factor in the z direction. 1 = 100% (no scaling change)
anchorThe anchor point for the scaling
void GlsMatrixAffine::Transform ( Vector v)

Transform the specified vertex using the data in the matrix, i.e.

v = M * v

void GlsMatrixAffine::Translate ( double  x,
double  y,
double  z 
)

Perform a translation, and combine this transformation with the existing matrix data.

Parameters
xtranslation in the x direction
ytranslation in the y direction
ztranslation in the z direction
void GlsMatrixAffine::Translate ( Vector v)

Perform a translation, and combine this transformation with the existing matrix data.

Parameters
vcontaining the translate values
void GlsMatrixAffine::Transpose ( )

Sets this matrix equal to its transpose.


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