This page has been translated automatically.
Программирование
Fundamentals
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
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::dmat4 Struct

Header:#include <UnigineMathLib.h>

Matrix of 3x4 double components.

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

dmat4 Class

Members


dmat4(const dvec3 & col0, const dvec3 & col1, const dvec3 & col2, const dvec3 & col3)

Arguments

  • const dvec3 & col0
  • const dvec3 & col1
  • const dvec3 & col2
  • const dvec3 & col3

dmat4(const quat & q, const dvec3 & v)

Arguments

  • const quat & q
  • const dvec3 & v

dmat4(const mat3 & m, const dvec3 & v)

Arguments

  • const mat3 & m
  • const dvec3 & v

dmat4(const float * m, int transpose)

Arguments

  • const float * m
  • int transpose

dmat4(const double * m, int transpose)

Arguments

  • const double * m
  • int transpose

dmat4(const mat3 & m)

Arguments

  • const mat3 & m

dmat4(const mat2 & m)

Arguments

  • const mat2 & m

dmat4(double v)

Arguments

  • double v

dmat4(const dmat4 & m)

Arguments

  • const dmat4 & m

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.

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.

void set(const float * v, int transpose)

Arguments

  • const float * v
  • int transpose

void set(const mat2 & m)

Arguments

  • const mat2 & m

void set(const mat3 & m)

Arguments

  • const mat3 & m

void set(const quat & q, const dvec3 & v)

Arguments

  • const quat & q
  • const dvec3 & v

void set(const quat & q)

Arguments

  • const quat & q

void set(const mat4 & m)

Arguments

  • const mat4 & m

void set(const double * v, int transpose)

Arguments

  • const double * v
  • int transpose

void set(const dmat4 & m)

Arguments

  • const dmat4 & m

void set(const mat3 & m, const dvec3 & v)

Arguments

  • const mat3 & m
  • const dvec3 & v

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.

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.

double * get()

Get a pointer to the matrix.

Return value

Pointer to the matrix.

const double * get() const

Get a constant pointer to the matrix.

Return value

Pointer to the matrix.

void get(double * m, int transpose)

Arguments

  • double * m
  • int transpose

dvec3 getBack()

void setColumn(int column, const dvec4 & v)

Set matrix column.

Arguments

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

dvec4 getColumn(int column) const

Get matrix row.

Arguments

  • int column - Row number.

Return value

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

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.

dvec3 getDown()

dvec3 getForward()

void setIdentity()

Set identity matrix.

dvec3 getLeft()

dvec3 getRight()

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 setRow(int row, const dvec4 & v)

Sets the matrix row.

Arguments

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

dvec4 getRow(int row) const

Get matrix row.

Arguments

  • int row - The row number.

Return value

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.

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

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.

dvec3 getUp()

void setZero()

const double * operator const double *()

const void * operator const void *()

double * operator double *()

void * operator void *()

dmat4 & operator*=(const dmat4 & m)

Matrix multiplication.

Arguments

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

Return value

The resulting matrix.

dmat4 & operator*=(double v)

Arguments

  • double v

dmat4 & operator+=(const dmat4 & m)

Arguments

  • const dmat4 & m

dmat4 operator-()

dmat4 & operator-=(const dmat4 & m)

Arguments

  • const dmat4 & m

dmat4 & operator=(const dmat4 & m)

Arguments

  • const dmat4 & m

double & operator[](int i)

Array access.

Arguments

  • int i - Array item index.

Return value

Array item.

double operator[](int i) const

Constant array access.

Arguments

  • int i - Array item index.

Return value

Array item.

__m128d sse0()

void sse0(const __m128d & v)

Arguments

  • const __m128d & v

void sse1(const __m128d & v)

Arguments

  • const __m128d & v

__m128d sse1()

void sse2(const __m128d & v)

Arguments

  • const __m128d & v

__m128d sse2()

void sse3(const __m128d & v)

Arguments

  • const __m128d & v

__m128d sse3()

void sse4(const __m128d & v)

Arguments

  • const __m128d & v

__m128d sse4()

__m128d sse5()

void sse5(const __m128d & v)

Arguments

  • const __m128d & v

int IDENTITY

int ONE

int ZERO

Last update: 03.07.2017
Build: ()