C# Class THREE.Matrix4

Mostra file Open project: guidovanhilst/SharpThreejs Class Usage Examples

Public Methods

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

Method Details

compose() public method

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
return void

copy() public method

Copies the values of matrix m into this matrix.
public copy ( Matrix4 m ) : void
m Matrix4
return void

copyPosition() public method

Copies the translation component of the supplied matrix m into this matrix translation component.
public copyPosition ( Matrix4 m ) : void
m Matrix4
return void

decompose() public method

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
return void

determinant() public method

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
return double

extractBasis() public method

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
return void

extractRotation() public method

Extracts the rotation of the supplied matrix m into this matrix rotation component.
public extractRotation ( Matrix4 m ) : void
m Matrix4
return void

identity() public method

Resets this matrix to identity.
public identity ( ) : void
return void

lookAt() public method

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
return void

makeBasis() public method

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
return void

makeTranslation() public method

Sets this matrix as translation transform.
public makeTranslation ( double x, double y, double z ) : Matrix4
x double
y double
z double
return Matrix4

multiply() public method

Multiplies this matrix by m.
public multiply ( Matrix4 m ) : void
m Matrix4
return void

multiplyMatrices() public method

Sets this matrix to a x b.
public multiplyMatrices ( Matrix4 a, Matrix4 b ) : void
a Matrix4
b Matrix4
return void

multiplyScalar() public method

Multiplies every component of the matrix by a scalar value s.
public multiplyScalar ( double s ) : void
s double
return void

scale() public method

Multiplies the columns of this matrix by vector v.
public scale ( Vector3 v ) : void
v Vector3
return void

set() public method

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
return void

transpose() public method

Transposes this matrix.
public transpose ( ) : void
return void