C# Класс THREE.Matrix4

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
compose ( Vector3 translation, THREE.Quaternion quaternion, Vector3 scale ) : void

Sets this matrix to the transformation composed of translation, quaternion and scale.

copy ( Matrix4 m ) : void

Copies the values of matrix m into this matrix.

copyPosition ( Matrix4 m ) : void

Copies the translation component of the supplied matrix m into this matrix translation component.

decompose ( Vector3 translation, THREE.Quaternion quaternion, Vector3 scale ) : void

Decomposes this matrix into the translation, quaternion and scale components.

determinant ( ) : double

Computes and returns the determinant of this matrix. Based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm

extractBasis ( Vector3 xAxis, Vector3 yAxis, Vector3 zAxis ) : void

Extracts basis of into the three axis vectors provided. Returns the current matrix.

extractRotation ( Matrix4 m ) : void

Extracts the rotation of the supplied matrix m into this matrix rotation component.

identity ( ) : void

Resets this matrix to identity.

lookAt ( Vector3 eye, Vector3 center, Vector3 up ) : void

Constructs a rotation matrix, looking from eye towards center with defined up vector.

makeBasis ( Vector3 xAxis, Vector3 yAxis, Vector3 zAxis ) : void

Creates the basis matrix consisting of the three provided axis vectors. Returns the current matrix.

makeTranslation ( double x, double y, double z ) : Matrix4

Sets this matrix as translation transform.

multiply ( Matrix4 m ) : void

Multiplies this matrix by m.

multiplyMatrices ( Matrix4 a, Matrix4 b ) : void

Sets this matrix to a x b.

multiplyScalar ( double s ) : void

Multiplies every component of the matrix by a scalar value s.

scale ( Vector3 v ) : void

Multiplies the columns of this matrix by vector v.

set ( double n11, double n12, double n13, double n14, double n21, double n22, double n23, double n24, double n31, double n32, double n33, double n34, double n41, double n42, double n43, double n44 ) : void

Sets all fields of this matrix to the supplied row-major values n11..n44.

transpose ( ) : void

Transposes this matrix.

Описание методов

compose() публичный Метод

Sets this matrix to the transformation composed of translation, quaternion and scale.
public compose ( Vector3 translation, THREE.Quaternion quaternion, Vector3 scale ) : void
translation Vector3
quaternion THREE.Quaternion
scale Vector3
Результат void

copy() публичный Метод

Copies the values of matrix m into this matrix.
public copy ( Matrix4 m ) : void
m Matrix4
Результат void

copyPosition() публичный Метод

Copies the translation component of the supplied matrix m into this matrix translation component.
public copyPosition ( Matrix4 m ) : void
m Matrix4
Результат void

decompose() публичный Метод

Decomposes this matrix into the translation, quaternion and scale components.
public decompose ( Vector3 translation, THREE.Quaternion quaternion, Vector3 scale ) : void
translation Vector3
quaternion THREE.Quaternion
scale Vector3
Результат void

determinant() публичный Метод

Computes and returns the determinant of this matrix. Based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
public determinant ( ) : double
Результат double

extractBasis() публичный Метод

Extracts basis of into the three axis vectors provided. Returns the current matrix.
public extractBasis ( Vector3 xAxis, Vector3 yAxis, Vector3 zAxis ) : void
xAxis Vector3
yAxis Vector3
zAxis Vector3
Результат void

extractRotation() публичный Метод

Extracts the rotation of the supplied matrix m into this matrix rotation component.
public extractRotation ( Matrix4 m ) : void
m Matrix4
Результат void

identity() публичный Метод

Resets this matrix to identity.
public identity ( ) : void
Результат void

lookAt() публичный Метод

Constructs a rotation matrix, looking from eye towards center with defined up vector.
public lookAt ( Vector3 eye, Vector3 center, Vector3 up ) : void
eye Vector3
center Vector3
up Vector3
Результат void

makeBasis() публичный Метод

Creates the basis matrix consisting of the three provided axis vectors. Returns the current matrix.
public makeBasis ( Vector3 xAxis, Vector3 yAxis, Vector3 zAxis ) : void
xAxis Vector3
yAxis Vector3
zAxis Vector3
Результат void

makeTranslation() публичный Метод

Sets this matrix as translation transform.
public makeTranslation ( double x, double y, double z ) : Matrix4
x double
y double
z double
Результат Matrix4

multiply() публичный Метод

Multiplies this matrix by m.
public multiply ( Matrix4 m ) : void
m Matrix4
Результат void

multiplyMatrices() публичный Метод

Sets this matrix to a x b.
public multiplyMatrices ( Matrix4 a, Matrix4 b ) : void
a Matrix4
b Matrix4
Результат void

multiplyScalar() публичный Метод

Multiplies every component of the matrix by a scalar value s.
public multiplyScalar ( double s ) : void
s double
Результат void

scale() публичный Метод

Multiplies the columns of this matrix by vector v.
public scale ( Vector3 v ) : void
v Vector3
Результат void

set() публичный Метод

Sets all fields of this matrix to the supplied row-major values n11..n44.
public set ( double n11, double n12, double n13, double n14, double n21, double n22, double n23, double n24, double n31, double n32, double n33, double n34, double n41, double n42, double n43, double n44 ) : void
n11 double
n12 double
n13 double
n14 double
n21 double
n22 double
n23 double
n24 double
n31 double
n32 double
n33 double
n34 double
n41 double
n42 double
n43 double
n44 double
Результат void

transpose() публичный Метод

Transposes this matrix.
public transpose ( ) : void
Результат void