This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Art Samples
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

This class represents a matrix of twelve (3x4) double components.

dmat4 Class

Properties

dvec3 AxisX#

The normalized vector representing the X axis.

dvec3 AxisY#

The normalized vector representing the Y axis.

dvec3 AxisZ#

The normalized vector representing the Z axis.

dvec3 Translate#

The three-component vector with the translation part of the matrix.

dvec3 Scale#

The three-component vector, representing the scaling part of the matrix.

Members


dmat4 ( ) #

Default constructor. Produces an identity matrix.

dmat4 ( mat4 m ) #

Constructor. Initializes the matrix using a given source mat4 matrix (4x4). The matrix elements are filled using corresponding elements of the source matrix.

Arguments

  • mat4 m - Source matrix (4x4).

dmat4 ( quat q ) #

Constructor. Initializes the matrix using a given source quaternion.

Arguments

  • quat q - Source quaternion.

void SetColumn ( int column, dvec4 v ) #

Sets the specified column of the matrix using a given dvec4 vector as a source.

Arguments

  • int column - Column.
  • dvec4 v - Source vector.

dvec4 GetColumn ( int column ) #

Returns the specified matrix column.

Arguments

  • int column - Column.

Return value

The dvec4 vector with column values.

void SetColumn3 ( int column, dvec3 v ) #

Sets the specified column of the matrix using a given three-component dvec3 vector as a source.

Arguments

  • int column - Column.
  • dvec3 v - Three-component source vector.

dvec3 GetColumn3 ( int column ) #

Returns the specified matrix column.

Arguments

  • int column - Column.

Return value

The dvec3 vector with column values.

void SetIdentity ( ) #

Sets the matrix equal to the identity matrix.

void SetRotate ( dvec3 axis, double angle ) #

Sets the rotation matrix for a given axis.

Arguments

  • dvec3 axis - Rotation axis.
  • double angle - Rotation angle, in degrees.

quat getRotate ( ) #

Returns the quaternion, representing the rotation part of the matrix.

Return value

Matrix rotation part.

void SetRotateX ( double angle ) #

Sets X rotation matrix.

Arguments

  • double angle - Rotation angle, in degrees.

void SetRotateY ( double angle ) #

Sets Y rotation matrix.

Arguments

  • double angle - Rotation angle, in degrees.

void SetRotateZ ( double angle ) #

Sets Z rotation matrix.

Arguments

  • double angle - Rotation angle, in degrees.

void SetRow ( int row, dvec4 v ) #

Sets the specified row of the matrix using a given dvec4 vector as a source.

Arguments

  • int row - Row.
  • dvec4 v - Source vector.

dvec4 GetRow ( int row ) #

Returns the specified matrix row.

Arguments

  • int row - Row.

Return value

The dvec4 vector with row values.

void SetRow3 ( int row, dvec3 v ) #

Sets the specified row of the matrix using a given three-component dvec3 vector as a source, the last element of the row remains as is.

Arguments

  • int row - Row.
  • dvec3 v - Three-component source vector.

dvec3 GetRow3 ( int row ) #

Returns the first three elements of the specified matrix row.

Arguments

  • int row - Row.

Return value

The dvec3 vector with the first three elements of the specified matrix row.

dmat4 Operator*= ( dmat4 m ) #

Performs matrix multiplication.

Arguments

  • dmat4 m - Matrix.

Return value

Resulting matrix.

double Operator[] ( int i ) #

Performs array access to the matrix item reference using given item index.

Arguments

  • int i - Matrix item index.

Return value

Matrix item reference.

double Operator[] ( int i ) #

Performs array access to the matrix item using given item index.

Arguments

  • int i - Matrix item index.

Return value

Matrix item.

dvec3 getAxisX ( ) #

Returns the normalized vector representing the X axis. Call this method to get the right or left vector of the matrix:
Source code (C++)
matrix.getAxisX(); // the left vector
-matrix.getAxisX(); // the right vector

Return value

Vector representing the X axis.

dvec3 getAxisY ( ) #

Returns the normalized vector representing the Y axis. Call this method to get the back or forward vector of the matrix:
Source code (C++)
matrix.getAxisY(); // the back vector
-matrix.getAxisY(); // the forward vector

Return value

Vector representing the Y axis.

dvec3 getAxisZ ( ) #

Returns the normalized vector representing the Z axis. Call this method to get the up or down vector of the matrix:
Source code (C++)
matrix.getAxisZ(); // the up vector
-matrix.getAxisZ(); // the down vector

Return value

Vector representing the Z axis.
Last update: 2021-04-29
Build: ()