C# 클래스 GarrysModLuaShared.Classes.VMatrix

Representation of a mathematical construct that allows Vectors to be transformed. This object can be created with Global.Matrix function.
상속: LuaObject
파일 보기 프로젝트 열기: OmegaExtern/gmod-csharp-binary-module

공개 메소드들

메소드 설명
GetAngles ( ) : Angle

Returns the absolute rotation of the matrix.

GetField ( byte row, byte column ) : double

Returns a specific field in the matrix.

GetForward ( ) : Vector

Gets the forward direction of the matrix. ie. The first column of the matrix, excluding the w coordinate.

GetInverse ( ) : VMatrix

Returns an inverted matrix without modifying the original matrix. Inverting the matrix will fail if its determinant is 0 or close to 0. (ie.its "scale" in any direction is 0.) See also GetInverseTR.

GetInverseTR ( ) : VMatrix

Returns an inverted matrix without modifying the original matrix. This function will not fail, but only works correctly on matrices that contain only translation and/or rotation. Using this function on a matrix with modified scale may return an incorrect inverted matrix. To get the inverse of a matrix that contains other modifications, see GetInverse.

GetRight ( ) : Vector

Gets the right direction of the matrix. ie. The second column of the matrix, negated, excluding the w coordinate.

GetScale ( ) : Vector

Returns the absolute scale of the matrix.

GetTranslation ( ) : Vector

Returns the absolute translation of the matrix.

GetUp ( ) : Vector

Gets the up direction of the matrix. ie. The third column of the matrix, excluding the w coordinate.

Identity ( ) : void

Initializes the matrix as Identity matrix.

Invert ( ) : bool

Inverts the matrix. Inverting the matrix will fail if its determinant is 0 or close to 0. (ie.its "scale" in any direction is 0.) If the matrix cannot be inverted, it does not get modified. See also InvertTR.

InvertTR ( ) : void

Inverts the matrix. This function will not fail, but only works correctly on matrices that contain only translation and/or rotation. Using this function on a matrix with modified scale may return an incorrect inverted matrix. To invert a matrix that contains other modifications, see Invert.

IsIdentity ( ) : bool

Returns whether the matrix is equal to Identity matrix or not.

IsRotationMatrix ( ) : bool

Returns whether the matrix is a rotation matrix or not. Technically it checks if the forward, right and up vectors are orthogonal and normalized.

Rotate ( Angle rotation ) : void

Rotates the matrix by the given angle. Postmultiplies the matrix by a rotation matrix(A = AR).

Scale ( Vector scale ) : void

Scales the matrix by the given vector. Postmultiplies the matrix by a scaling matrix(A = AS).

ScaleTranslation ( double scale ) : void

Scales the absolute translation with the given value.

Set ( VMatrix sourceMatrix ) : void

Copies values from the given matrix object.

SetAngles ( Angle angle ) : void

Sets the absolute rotation of the matrix.

SetField ( byte row, byte column, double value ) : void

Sets a specific field in the matrix.

SetForward ( Vector forward ) : void

Sets the forward direction of the matrix. ie. The first column of the matrix, excluding the w coordinate.

SetRight ( Vector forward ) : void

Sets the right direction of the matrix. ie. The second column of the matrix, negated, excluding the w coordinate.

SetScale ( Vector scale ) : void

Modifies the scale of the matrix while preserving the rotation and translation.

SetTranslation ( Vector translation ) : void

Sets the absolute translation of the matrix.

SetUp ( Vector forward ) : void

Sets the up direction of the matrix. ie. The third column of the matrix, excluding the w coordinate.

ToTable ( ) : LuaTable

Converts the matrix to a 4x4 table. See Global.Matrix function.

Translate ( Vector translation ) : void

Translates the matrix by the given vector aka. adds the vector to the translation. Postmultiplies the matrix by a translation matrix(A = AT).

VMatrix ( LuaTable data )
VMatrix ( int index )

메소드 상세

GetAngles() 공개 메소드

Returns the absolute rotation of the matrix.
public GetAngles ( ) : Angle
리턴 Angle

GetField() 공개 메소드

Returns a specific field in the matrix.
public GetField ( byte row, byte column ) : double
row byte Row of the field whose value is to be retrieved, from 1 to 4.
column byte Column of the field whose value is to be retrieved, from 1 to 4.
리턴 double

GetForward() 공개 메소드

Gets the forward direction of the matrix. ie. The first column of the matrix, excluding the w coordinate.
public GetForward ( ) : Vector
리턴 Vector

GetInverse() 공개 메소드

Returns an inverted matrix without modifying the original matrix. Inverting the matrix will fail if its determinant is 0 or close to 0. (ie.its "scale" in any direction is 0.) See also GetInverseTR.
public GetInverse ( ) : VMatrix
리턴 VMatrix

GetInverseTR() 공개 메소드

Returns an inverted matrix without modifying the original matrix. This function will not fail, but only works correctly on matrices that contain only translation and/or rotation. Using this function on a matrix with modified scale may return an incorrect inverted matrix. To get the inverse of a matrix that contains other modifications, see GetInverse.
public GetInverseTR ( ) : VMatrix
리턴 VMatrix

GetRight() 공개 메소드

Gets the right direction of the matrix. ie. The second column of the matrix, negated, excluding the w coordinate.
public GetRight ( ) : Vector
리턴 Vector

GetScale() 공개 메소드

Returns the absolute scale of the matrix.
public GetScale ( ) : Vector
리턴 Vector

GetTranslation() 공개 메소드

Returns the absolute translation of the matrix.
public GetTranslation ( ) : Vector
리턴 Vector

GetUp() 공개 메소드

Gets the up direction of the matrix. ie. The third column of the matrix, excluding the w coordinate.
public GetUp ( ) : Vector
리턴 Vector

Identity() 공개 메소드

Initializes the matrix as Identity matrix.
public Identity ( ) : void
리턴 void

Invert() 공개 메소드

Inverts the matrix. Inverting the matrix will fail if its determinant is 0 or close to 0. (ie.its "scale" in any direction is 0.) If the matrix cannot be inverted, it does not get modified. See also InvertTR.
public Invert ( ) : bool
리턴 bool

InvertTR() 공개 메소드

Inverts the matrix. This function will not fail, but only works correctly on matrices that contain only translation and/or rotation. Using this function on a matrix with modified scale may return an incorrect inverted matrix. To invert a matrix that contains other modifications, see Invert.
public InvertTR ( ) : void
리턴 void

IsIdentity() 공개 메소드

Returns whether the matrix is equal to Identity matrix or not.
public IsIdentity ( ) : bool
리턴 bool

IsRotationMatrix() 공개 메소드

Returns whether the matrix is a rotation matrix or not. Technically it checks if the forward, right and up vectors are orthogonal and normalized.
public IsRotationMatrix ( ) : bool
리턴 bool

Rotate() 공개 메소드

Rotates the matrix by the given angle. Postmultiplies the matrix by a rotation matrix(A = AR).
public Rotate ( Angle rotation ) : void
rotation Angle Rotation angle.
리턴 void

Scale() 공개 메소드

Scales the matrix by the given vector. Postmultiplies the matrix by a scaling matrix(A = AS).
public Scale ( Vector scale ) : void
scale Vector Vector to scale with matrix with.
리턴 void

ScaleTranslation() 공개 메소드

Scales the absolute translation with the given value.
public ScaleTranslation ( double scale ) : void
scale double Value to scale the translation with.
리턴 void

Set() 공개 메소드

Copies values from the given matrix object.
public Set ( VMatrix sourceMatrix ) : void
sourceMatrix VMatrix The matrix to copy values from.
리턴 void

SetAngles() 공개 메소드

Sets the absolute rotation of the matrix.
public SetAngles ( Angle angle ) : void
angle Angle New angles.
리턴 void

SetField() 공개 메소드

Sets a specific field in the matrix.
public SetField ( byte row, byte column, double value ) : void
row byte Row of the field to be set, from 1 to 4.
column byte Column of the field to be set, from 1 to 4.
value double The value to set in that field.
리턴 void

SetForward() 공개 메소드

Sets the forward direction of the matrix. ie. The first column of the matrix, excluding the w coordinate.
public SetForward ( Vector forward ) : void
forward Vector The forward direction of the matrix.
리턴 void

SetRight() 공개 메소드

Sets the right direction of the matrix. ie. The second column of the matrix, negated, excluding the w coordinate.
public SetRight ( Vector forward ) : void
forward Vector The right direction of the matrix.
리턴 void

SetScale() 공개 메소드

Modifies the scale of the matrix while preserving the rotation and translation.
public SetScale ( Vector scale ) : void
scale Vector The scale to set.
리턴 void

SetTranslation() 공개 메소드

Sets the absolute translation of the matrix.
public SetTranslation ( Vector translation ) : void
translation Vector New translation.
리턴 void

SetUp() 공개 메소드

Sets the up direction of the matrix. ie. The third column of the matrix, excluding the w coordinate.
public SetUp ( Vector forward ) : void
forward Vector The up direction of the matrix.
리턴 void

ToTable() 공개 메소드

Converts the matrix to a 4x4 table. See Global.Matrix function.
public ToTable ( ) : LuaTable
리턴 LuaTable

Translate() 공개 메소드

Translates the matrix by the given vector aka. adds the vector to the translation. Postmultiplies the matrix by a translation matrix(A = AT).
public Translate ( Vector translation ) : void
translation Vector Vector to translate the matrix by.
리턴 void

VMatrix() 공개 메소드

public VMatrix ( LuaTable data )
data LuaTable

VMatrix() 공개 메소드

public VMatrix ( int index )
index int