| Python Script Engine 8.3 GL Studio Editor Python Script API

Public Member Functions | List of all members
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() [1/6]

GlsMatrixAffine::GlsMatrixAffine | ( |  | ) |

default ctor

## ◆ ~GlsMatrixAffine()

virtual GlsMatrixAffine::~GlsMatrixAffine | ( |  | ) |
| virtual

dtor

## ◆ GlsMatrixAffine() [2/6]

GlsMatrixAffine::GlsMatrixAffine | ( | disti::GlsMatrixAffineD * | matrix,
|  | bool | incEditorRef
| ) |  |

## ◆ GlsMatrixAffine() [3/6]

GlsMatrixAffine::GlsMatrixAffine | ( | GlsMatrixAffine & | src | ) |

## ◆ GlsMatrixAffine() [4/6]

GlsMatrixAffine::GlsMatrixAffine | ( | std::vector< double > & | data | ) |

## ◆ GlsMatrixAffine() [5/6]

GlsMatrixAffine::GlsMatrixAffine | ( | double | m[4][4] | ) |

Constructor.

Parameters

  m | a row-major, two-dimensional array used to initialize the matrix.

## ◆ GlsMatrixAffine() [6/6]

GlsMatrixAffine::GlsMatrixAffine | ( | double * | m | ) |

Constructor.

Parameters

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

## Member Function Documentation

## ◆ Data()

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.

## ◆ Determinant()

double GlsMatrixAffine::Determinant | ( |  | ) |

Calculates the determinant of the matrix.

Returns
  the calculated value of the determinant.

## ◆ Invert()

void GlsMatrixAffine::Invert | ( |  | ) |

Sets this matrix equal to its inverse.

## ◆ IsIdentity()

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.

## ◆ MakeIdentity()

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.

## ◆ Rotate()

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

  angle | rotation angle in degrees
  centerOfRotation | point to rotate around
  axis | arbitray axis of rotation

## ◆ Scale() [1/2]

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

  x | scaling factor in the x direction. 1 = 100% (no scaling change)
  y | scaling factor in the y direction. 1 = 100% (no scaling change)
  z | scaling factor in the z direction. 1 = 100% (no scaling change)

## ◆ Scale() [2/2]

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

  x | scaling factor in the x direction. 1 = 100% (no scaling change)
  y | scaling factor in the y direction. 1 = 100% (no scaling change)
  z | scaling factor in the z direction. 1 = 100% (no scaling change)
  anchor | The anchor point for the scaling

## ◆ Transform()

void GlsMatrixAffine::Transform | ( | Vector & | v | ) |

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

v = M * v

## ◆ Translate() [1/2]

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

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

Parameters

  x | translation in the x direction
  y | translation in the y direction
  z | translation in the z direction

## ◆ Translate() [2/2]

void GlsMatrixAffine::Translate | ( | Vector & | v | ) |

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

Parameters

  v | containing the translate values

## ◆ Transpose()

void GlsMatrixAffine::Transpose | ( |  | ) |

Sets this matrix equal to its transpose.

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

- GlsMatrixAffine.i