This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.mat4 Struct

Notice
The functions listed below are the members of the Unigine.MathLib namespace.

mat4 Class

Properties

float m00#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m10#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m20#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m30#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m01#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m11#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m21#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m31#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m02#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m12#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m22#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m32#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m03#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m13#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m23#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

float m33#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

mat4 ZERO#

The Matrix, filled with zeros (0).

mat4 ONE#

The Matrix, filled with ones (1).

mat4 IDENTITY#

The Identity matrix.

vec4 Row0#

The First row.

vec4 Row1#

The Second row.

vec4 Row2#

The Third row.

vec4 Row3#

The Fourth row.

vec4 Column0#

The First column.

vec4 Column1#

The Second column.

vec4 Column2#

The Third column.

vec4 Column3#

The Fourth column.

vec4 AxisX#

The X axis.

vec4 AxisY#

The Y axis.

vec4 AxisZ#

The Z axis.

vec4 AxisW#

The W axis.

vec4 Diagonal#

The Vector containing diagonal elements of the matrix.

vec3 Translate#

The Translation part of the matrix. For more information see Matrix Transformations.

vec3 Scale#

The Scaling part of the matrix. For more information see Matrix Transformations.

float Trace#

The Trace of the matrix: (sum of its diagonal elements).

float Determinant#

The Determinant of the matrix.

float Determinant3#

The Determinant of the smaller 3x3 matrix.

Members


bool operator== ( mat4 v0, mat4 v1 ) #

Performs equal comparison.

Arguments

  • mat4 v0 - First value.
  • mat4 v1 - Second value.

bool operator!= ( mat4 v0, mat4 v1 ) #

Not equal comparison.

Arguments

  • mat4 v0 - First value.
  • mat4 v1 - Second value.

bool Equals ( mat4 other ) #

Checks if the vector and the specified argument are equal (epsilon).

Arguments

  • mat4 other - Value to be checked for equality.

Return value

Return value.

bool Equals ( object obj ) #

Checks if the vector and the specified argument are equal (epsilon).

Arguments

Return value

Return value.

int GetHashCode ( ) #

Returns a hash code for the current object. Serves as the default hash function.

Return value

Resulting int value.

mat4 operator- ( mat4 m ) #

Subtraction.

Arguments

mat4 operator* ( mat4 m, float v ) #

Multiplication.

Arguments

  • mat4 m - Matrix.
  • float v - Value.

vec2 operator* ( mat4 m, vec2 v ) #

Multiplication.

Arguments

vec2 operator* ( vec2 v, mat4 m ) #

Multiplication.

Arguments

vec3 operator* ( mat4 m, vec3 v ) #

Multiplication.

Arguments

vec3 operator* ( vec3 v, mat4 m ) #

Multiplication.

Arguments

vec4 operator* ( mat4 m, vec4 v ) #

Multiplication.

Arguments

vec4 operator* ( vec4 v, mat4 m ) #

Multiplication.

Arguments

dvec2 operator* ( mat4 m, dvec2 v ) #

Multiplication.

Arguments

dvec2 operator* ( dvec2 v, mat4 m ) #

Multiplication.

Arguments

dvec3 operator* ( mat4 m, dvec3 v ) #

Multiplication.

Arguments

dvec3 operator* ( dvec3 v, mat4 m ) #

Multiplication.

Arguments

dvec4 operator* ( mat4 m, dvec4 v ) #

Multiplication.

Arguments

dvec4 operator* ( dvec4 v, mat4 m ) #

Multiplication.

Arguments

mat4 operator* ( mat4 m0, mat4 m1 ) #

Multiplication.

Arguments

  • mat4 m0 - First value.
  • mat4 m1 - Second value.

mat4 operator+ ( mat4 m0, mat4 m1 ) #

Addition.

Arguments

  • mat4 m0 - First value.
  • mat4 m1 - Second value.

mat4 operator- ( mat4 m0, mat4 m1 ) #

Subtraction.

Arguments

  • mat4 m0 - First value.
  • mat4 m1 - Second value.

void Set ( float m00_, float m10_, float m20_, float m30_, float m01_, float m11_, float m21_, float m31_, float m02_, float m12_, float m22_, float m32_, float m03_, float m13_, float m23_, float m33_ ) #

Sets the value using the specified argument(s).

Arguments

  • float m00_ - m00_ element.
  • float m10_ - m10_ element.
  • float m20_ - m20_ element.
  • float m30_ - m30_ element.
  • float m01_ - m01_ element.
  • float m11_ - m11_ element.
  • float m21_ - m21_ element.
  • float m31_ - m31_ element.
  • float m02_ - m02_ element.
  • float m12_ - m12_ element.
  • float m22_ - m22_ element.
  • float m32_ - m32_ element.
  • float m03_ - m03_ element.
  • float m13_ - m13_ element.
  • float m23_ - m23_ element.
  • float m33_ - m33_ element.

void Set ( float v ) #

Sets the value using the specified argument(s).

Arguments

  • float v - A float value to be used.

void Set ( mat2 m ) #

Sets the value using the specified argument(s).

Arguments

  • mat2 m - Source matrix.

void Set ( mat3 m ) #

Sets the value using the specified argument(s).

Arguments

  • mat3 m - Source matrix.

void Set ( mat4 m ) #

Sets the value using the specified argument(s).

Arguments

  • mat4 m - Source matrix.

void Set ( dmat4 m ) #

Sets the value using the specified argument(s).

Arguments

void Set ( vec4 col0, vec4 col1, vec4 col2, vec4 col3 ) #

Sets the value using the specified argument(s).

Arguments

  • vec4 col0 - First column.
  • vec4 col1 - Second column.
  • vec4 col2 - Third column.
  • vec4 col3 - Fourth column.

void Set ( quat q ) #

Sets the value using the specified argument(s).

Arguments

  • quat q - Source quaternion.

void Set ( mat3 m, vec3 v ) #

Sets the value using the specified argument(s).

Arguments

  • mat3 m - Source matrix.
  • vec3 v - Source vector.

void Set ( quat q, vec3 v ) #

Sets the value using the specified argument(s).

Arguments

  • quat q - Source quaternion.
  • vec3 v - Source vector.

void Set ( float[] m, bool transpose ) #

Sets the value using the specified argument(s).

Arguments

  • float[] m - Source matrix.
  • bool transpose - true - to transpose the resulting matrix, false -not to transpose.

void SetRow ( int row, vec4 v ) #

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

Arguments

  • int row - Row index.
  • vec4 v - Source vector.

void SetRow3 ( int row, vec3 v ) #

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

Arguments

  • int row - Row index.
  • vec3 v - Source vector.

vec4 GetRow ( int row ) #

Returns the specified matrix row.

Arguments

  • int row - Row index.

Return value

Return value.

vec3 GetRow3 ( int row ) #

Returns the first three elements of the specified matrix row.

Arguments

  • int row - Row index.

Return value

Return value.

void SetColumn ( int column, vec4 v ) #

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

Arguments

  • int column - Column index.
  • vec4 v - Source vector.

void SetColumn3 ( int column, vec3 v ) #

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

Arguments

  • int column - Column index.
  • vec3 v - Source vector.

vec4 GetColumn ( int column ) #

Returns the specified matrix column.

Arguments

  • int column - Column index.

Return value

Return value.

vec3 GetColumn3 ( int column ) #

Returns the XYZ components of the specified matrix column.

Arguments

  • int column - Column index.

Return value

Return value.

void Clear ( ) #

Clears the value by setting all components/elements to 0.

void SetZero ( ) #

Sets all matrix elements equal to 0.

void SetIdentity ( ) #

Sets the matrix equal to the identity matrix.

void SetRotate ( vec3 axis, float angle ) #

Sets the rotation matrix for a given axis.

Arguments

  • vec3 axis - Axis of rotation.
  • float angle - Angle, in degrees.

quat GetRotate ( ) #

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

Return value

Resulting rotation matrix.

void SetRotateX ( float angle ) #

Sets X rotation matrix.

Arguments

  • float angle - Angle, in degrees.

void SetRotateY ( float angle ) #

Sets Y rotation matrix.

Arguments

  • float angle - Angle, in degrees.

void SetRotateZ ( float angle ) #

Set Z rotation matrix.

Arguments

  • float angle - Angle, in degrees.

string ToString ( ) #

Converts the current value to a string value.

Return value

Resulting string value.
Last update: 2023-06-23
Build: ()