This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

dmat4 Struct (C++)

Matrix of 3x4 double components.

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

Unigine::dmat4Structure

Members


UNIGINE_DECLARE_USE_MEMORY 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)

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.

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

Array item.

UNIGINE_INLINE double operator[] (int i) const

Constant array access.

Arguments

  • int i - Array item index.

Return value

Array item.

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 (int row, int column) const

Get constant matrix item.

Arguments

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

Return value

The matrix item.

void set (const double * m, int transpose)

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.

void set (const float * m, int transpose)

Set matrix.

Arguments

  • const float * m - Pointer to the matrix.
  • int transpose - If transpose is 0 (by default), the matrix is specified in the column major style.

void get (double * m, int transpose) 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.

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)

Sets the matrix row.

Arguments

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

void setRow3 (int row, const dvec3 & v)

Sets the new value for the given matrix row.

Arguments

  • int row - The row number.
  • const dvec3 & v - Row value.

dvec4 getRow (int row) const

Get matrix row.

Arguments

  • int row - The row number.

Return value

Row value.

dvec3 getRow3 (int row) const

Returns the current value of the given matrix row. If such a row does not exist, the matrix identity is returned.

Arguments

  • int row - The row number.

Return value

Row value.

void setColumn (int column, const dvec4 & v)

Set matrix column.

Arguments

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

void setColumn3 (int column, const dvec3 & v)

Sets the new value for the given matrix column.

Arguments

  • int column - Column number.
  • const dvec3 & v - Row value.

dvec4 getColumn (int column) const

Get matrix row.

Arguments

  • int column - Row number.

Return value

Row value.

dvec3 getColumn3 (int column) const

Returns the current value of the given matrix column. If such a column does not exist, the matrix identity is returned.

Arguments

  • int column - Column number.

Return value

Row value.

void setIdentity ()

Set identity matrix.

void setTranslate (const dvec3 & v)

Set translation matrix.

Arguments

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

dvec3 getTranslate () const

Get translation part of the matrix.

Return value

Matrix translation part.

void setRotate (const dvec3 & axis, double angle)

Set rotation matrix.

Arguments

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

quat getRotate () const

Get rotation part of the matrix.

Return value

Matrix rotation part.

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.

vec3 getScale () const

Get scaling part of the matrix.

Return value

Matrix scaling part.

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: ()