This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::dmat4 Struct

Matrix of 3x4 double components.

To use this structure, include the UnigineMathLib.h file.

Unigine::dmat4 Structure

Members


dmat4 ()

Default constructor that produces an identity matrix.

explicit dmat4 (const mat4 & m)

Initialization by a matrix.

Arguments

  • const mat4 & m - The value of the matrix.

explicit dmat4 (const quat & q)

Initialization by a quaternion.

Arguments

  • const quat & q - The value of the quaternion.

explicit dmat4 (const double * m, int transpose, int square)

Initialization by a pointer to the matrix.

Arguments

  • const double * m - Pointer to the matrix.
  • int transpose - If transpose is 0 (by default), the matrix is specified in the column-major style.
  • int square - If square is 0 (by default), the matrix is treated as 4x3 matrix.

dmat4 & operator*= (const dmat4 & m)

Matrix multiplication.

Arguments

  • const dmat4 & m - The value of the matrix.

Return value

The resulting matrix.

UNIGINE_INLINE double & operator[] (int i)

Array access.

Arguments

  • int i - Array item index.

Return value

The array item.

UNIGINE_INLINE double operator[] () const

UNIGINE_INLINE void set (int row, int column, double v)

Set matrix item.

Arguments

  • int row - The row number.
  • int column - The column number.
  • double v - The matrix item.

UNIGINE_INLINE double & get (int row, int column)

Get matrix item.

Arguments

  • int row - The row number.
  • int column - The column number.

Return value

The matrix item.

UNIGINE_INLINE double get () const

void set (const double * m, int transpose, int square)

Set matrix.

Arguments

  • const double * m - Pointer to the matrix.
  • int transpose - If transpose is 0 (by default), the matrix is specified in the column major style.
  • int square - If square is 0 (by default), the matrix is treated as 4x3 matrix.

void get (double * m, int transpose, int square) const

Get matrix.

Arguments

  • double * m - Pointer to the matrix.
  • int transpose - If transpose is 0 (by default), the matrix is specified in the column major style.
  • int square - If square is 0 (by default), the matrix is treated as 4x3 matrix.

UNIGINE_INLINE double * get ()

Get a pointer to the matrix.

Return value

Pointer to the matrix.

UNIGINE_INLINE const double * get () const

Get a constant pointer to the matrix.

Return value

Pointer to the matrix.

void setRow (int row, const dvec4 & v)

Set matrix row.

Arguments

  • int row - The row number.
  • const dvec4 & v - The row value.

void setRow3 ()

dvec4 getRow (int row) const

Get matrix row.

Arguments

  • int row - The row number.

Return value

Tme row value.

dvec3 getRow3 () const

void setColumn (int column, const dvec4 & v)

Set matrix column.

Arguments

  • int column - The column number.
  • const dvec4 & v - The column value.

void setColumn3 ()

dvec4 getColumn (int column) const

Get matrix row.

Arguments

  • int column - The row number.

Return value

The row value.

dvec3 getColumn3 () const

void setIdentity ()

Set identity matrix.

void setTranslate (const dvec3 & v)

Set translation matrix.

Arguments

  • const dvec3 & v - The value of the translation vector.

void setRotate (const dvec3 & axis, double angle)

Set rotation matrix.

Arguments

  • const dvec3 & axis - Rotation axis.
  • double angle - Rotation angle (in degrees).

void setRotateX (double angle)

Set X rotation matrix.

Arguments

  • double angle - Rotation angle (in degrees).

void setRotateY (double angle)

Set Y rotation matrix.

Arguments

  • double angle - Rotation angle (in degrees).

void setRotateZ (double angle)

Set Z rotation matrix.

Arguments

  • double angle - Rotation angle (in degrees).

void setScale (const dvec3 & v)

Set scale matrix.

Arguments

  • const dvec3 & v - The value of the scaling vector.

Unigine::dmat4:: Union

union {
struct {
double m00;
double m10;
double m20;
double m01;
double m11;
double m21;
double m02;
double m12;
double m22;
double m03;
double m13;
double m23;
};
double mat[12];
};
Last update: 2017-07-03
Build: ()