engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 友元 | 所有成员列表
FMatrix结构体 参考

4x4 matrix of floating point values. 更多...

#include <Matrix.h>

+ 类 FMatrix 继承关系图:

Public 成员函数

FMatrix ApplyScale (float Scale) const
 Apply Scale to this matrix
 
CORE_API uint32 ComputeHash () const
 For debugging purpose, could be changed
 
FMatrix ConcatTranslation (const FVector &Translation) const
 Returns a matrix with an additional translation concatenated.
 
bool ContainsNaN () const
 Returns true if any element of this matrix is NaN
 
void DebugPrint () const
 Output ToString
 
bool Equals (const FMatrix &Other, float Tolerance=KINDA_SMALL_NUMBER) const
 Checks whether another Matrix is equal to this, within specified tolerance. 更多...
 
FVector ExtractScaling (float Tolerance=SMALL_NUMBER)
 Remove any scaling from this matrix (ie magnitude of each row is 1) and return the 3D scale vector that was initially present with error Tolerance
 
FORCEINLINE FMatrix (const FPlane &InX, const FPlane &InY, const FPlane &InZ, const FPlane &InW)
 Constructor. 更多...
 
FORCEINLINE FMatrix (const FVector &InX, const FVector &InY, const FVector &InZ, const FVector &InW)
 Constructor. 更多...
 
FORCEINLINE FMatrix (EForceInit)
 Constructor. 更多...
 
FVector GetColumn (int32 i) const
 get a column of this matrix 更多...
 
FORCEINLINE bool GetFrustumBottomPlane (FPlane &OutPlane) const
 
FORCEINLINE bool GetFrustumFarPlane (FPlane &OutPlane) const
 
FORCEINLINE bool GetFrustumLeftPlane (FPlane &OutPlane) const
 
FORCEINLINE bool GetFrustumNearPlane (FPlane &OutPlane) const
 
FORCEINLINE bool GetFrustumRightPlane (FPlane &OutPlane) const
 
FORCEINLINE bool GetFrustumTopPlane (FPlane &OutPlane) const
 
float GetMaximumAxisScale () const
 
void GetScaledAxes (FVector &X, FVector &Y, FVector &Z) const
 get axes of this matrix scaled by the scale of the matrix 更多...
 
FVector GetScaledAxis (EAxis::Type Axis) const
 get axis of this matrix scaled by the scale of the matrix 更多...
 
FVector GetScaleVector (float Tolerance=SMALL_NUMBER) const
 return a 3D scale vector calculated from this matrix (where each component is the magnitude of a row vector) with error Tolerance.
 
void GetUnitAxes (FVector &X, FVector &Y, FVector &Z) const
 get unit length axes of this matrix 更多...
 
FVector GetUnitAxis (EAxis::Type Axis) const
 get unit length axis of this matrix 更多...
 
FMatrix Inverse () const
 Fast path, and handles nil matrices.
 
FMatrix InverseFast () const
 Fast path, doesn't check for nil matrices in final release builds
 
FORCEINLINE FVector InverseTransformPosition (const FVector &V) const
 Inverts the matrix and then transforms V - correctly handles scaling in this matrix.
 
FORCEINLINE FVector InverseTransformVector (const FVector &V) const
 Transform a direction vector by the inverse of this matrix - will not take into account translation part. 更多...
 
void Mirror (EAxis::Type MirrorAxis, EAxis::Type FlipAxis)
 Utility for mirroring this transform across a certain plane, and flipping one of the axis as well.
 
bool operator!= (const FMatrix &Other) const
 Checks whether another Matrix is not equal to this, within specified tolerance. 更多...
 
FORCEINLINE FMatrix operator* (const FMatrix &Other) const
 Gets the result of multiplying a Matrix to this. 更多...
 
FORCEINLINE FMatrix operator* (float Other) const
 This isn't applying SCALE, just multiplying the value to all members - i.e. 更多...
 
FORCEINLINE void operator*= (const FMatrix &Other)
 Multiply this by a matrix. 更多...
 
FORCEINLINE void operator*= (float Other)
 Multiply this matrix by a weighting factor. 更多...
 
FORCEINLINE FMatrix operator+ (const FMatrix &Other) const
 Gets the result of adding a matrix to this. 更多...
 
FORCEINLINE void operator+= (const FMatrix &Other)
 Adds to this matrix. 更多...
 
bool operator== (const FMatrix &Other) const
 Checks whether two matrix are identical. 更多...
 
CORE_API FRotator Rotator () const
 
float RotDeterminant () const
 
void ScaleTranslation (const FVector &Scale3D)
 Scale the translation part of the matrix by the supplied vector.
 
void SetAxes (FVector *Axis0=NULL, FVector *Axis1=NULL, FVector *Axis2=NULL, FVector *Origin=NULL)
 Update the axes of the matrix if any value is NULL do not update that axis 更多...
 
void SetAxis (int32 i, const FVector &Axis)
 set an axis of this matrix 更多...
 
void SetColumn (int32 i, FVector Value)
 Set a column of this matrix 更多...
 
void To3x4MatrixTranspose (float *Out) const
 Convert this Atom to the 3x4 transpose of the transformation matrix.
 
CORE_API FQuat ToQuat () const
 Transform a rotation matrix into a quaternion. 更多...
 
CORE_API FString ToString () const
 Get a textual representation of the vector. 更多...
 
FORCEINLINE FVector4 TransformPosition (const FVector &V) const
 Transform a location - will take into account translation part of the FMatrix.
 
FORCEINLINE FVector4 TransformVector (const FVector &V) const
 Transform a direction vector - will not take into account translation part of the FMatrix. 更多...
 

友元

CORE_API FArchive & operator<< (FArchive &Ar, FMatrix &M)
 Serializes the Matrix. 更多...
 

详细描述

4x4 matrix of floating point values.

Matrix-matrix multiplication happens with a pre-multiple of the transpose – in other words, Res = Mat1.operator*(Mat2) means Res = Mat2^T * Mat1, as opposed to Res = Mat1 * Mat2. Matrix elements are accessed with M[RowIndex][ColumnIndex].

构造及析构函数说明

◆ FMatrix() [1/3]

FORCEINLINE FMatrix::FMatrix ( EForceInit  )
inlineexplicit

Constructor.

参数
EForceInitForce Init Enum.

◆ FMatrix() [2/3]

FORCEINLINE FMatrix::FMatrix ( const FPlane &  InX,
const FPlane &  InY,
const FPlane &  InZ,
const FPlane &  InW 
)

Constructor.

参数
InXX plane
InYY plane
InZZ plane
InWW plane

◆ FMatrix() [3/3]

FORCEINLINE FMatrix::FMatrix ( const FVector &  InX,
const FVector &  InY,
const FVector &  InZ,
const FVector &  InW 
)

Constructor.

参数
InXX vector
InYY vector
InZZ vector
InWW vector

成员函数说明

◆ Equals()

bool FMatrix::Equals ( const FMatrix &  Other,
float  Tolerance = KINDA_SMALL_NUMBER 
) const
inline

Checks whether another Matrix is equal to this, within specified tolerance.

参数
OtherThe other Matrix.
ToleranceError Tolerance.
返回
true if two Matrix are equal, within specified tolerance, otherwise false.

◆ GetColumn()

FVector FMatrix::GetColumn ( int32  i) const
inline

get a column of this matrix

参数
iindex into the column of the matrix
返回
vector of the column

◆ GetFrustumBottomPlane()

FORCEINLINE bool FMatrix::GetFrustumBottomPlane ( FPlane &  OutPlane) const
参数
OutPlanethe bottom plane of the Frustum of this matrix

◆ GetFrustumFarPlane()

FORCEINLINE bool FMatrix::GetFrustumFarPlane ( FPlane &  OutPlane) const
参数
OutPlanethe far plane of the Frustum of this matrix

◆ GetFrustumLeftPlane()

FORCEINLINE bool FMatrix::GetFrustumLeftPlane ( FPlane &  OutPlane) const
参数
OutPlanethe left plane of the Frustum of this matrix

◆ GetFrustumNearPlane()

FORCEINLINE bool FMatrix::GetFrustumNearPlane ( FPlane &  OutPlane) const
参数
OutPlanethe near plane of the Frustum of this matrix

◆ GetFrustumRightPlane()

FORCEINLINE bool FMatrix::GetFrustumRightPlane ( FPlane &  OutPlane) const
参数
OutPlanethe right plane of the Frustum of this matrix

◆ GetFrustumTopPlane()

FORCEINLINE bool FMatrix::GetFrustumTopPlane ( FPlane &  OutPlane) const
参数
OutPlanethe top plane of the Frustum of this matrix

◆ GetMaximumAxisScale()

float FMatrix::GetMaximumAxisScale ( ) const
inline
返回
the maximum magnitude of any row of the matrix.

◆ GetScaledAxes()

void FMatrix::GetScaledAxes ( FVector &  X,
FVector &  Y,
FVector &  Z 
) const
inline

get axes of this matrix scaled by the scale of the matrix

参数
Xaxes returned to this param
Yaxes returned to this param
Zaxes returned to this param

◆ GetScaledAxis()

FVector FMatrix::GetScaledAxis ( EAxis::Type  Axis) const
inline

get axis of this matrix scaled by the scale of the matrix

参数
iindex into the axis of the matrix @ return vector of the axis

◆ GetUnitAxes()

void FMatrix::GetUnitAxes ( FVector &  X,
FVector &  Y,
FVector &  Z 
) const
inline

get unit length axes of this matrix

参数
Xaxes returned to this param
Yaxes returned to this param
Zaxes returned to this param

◆ GetUnitAxis()

FVector FMatrix::GetUnitAxis ( EAxis::Type  Axis) const
inline

get unit length axis of this matrix

参数
iindex into the axis of the matrix
返回
vector of the axis

◆ InverseTransformVector()

FORCEINLINE FVector FMatrix::InverseTransformVector ( const FVector &  V) const

Transform a direction vector by the inverse of this matrix - will not take into account translation part.

If you want to transform a surface normal (or plane) and correctly account for non-uniform scaling you should use TransformByUsingAdjointT with adjoint of matrix inverse.

◆ operator!=()

bool FMatrix::operator!= ( const FMatrix &  Other) const
inline

Checks whether another Matrix is not equal to this, within specified tolerance.

参数
OtherThe other Matrix.
返回
true if two Matrix are not equal, within specified tolerance, otherwise false.

◆ operator*() [1/2]

FORCEINLINE FMatrix FMatrix::operator* ( const FMatrix &  Other) const

Gets the result of multiplying a Matrix to this.

参数
OtherThe matrix to multiply this by.
返回
The result of multiplication.

◆ operator*() [2/2]

FORCEINLINE FMatrix FMatrix::operator* ( float  Other) const

This isn't applying SCALE, just multiplying the value to all members - i.e.

weighting

◆ operator*=() [1/2]

FORCEINLINE void FMatrix::operator*= ( const FMatrix &  Other)

Multiply this by a matrix.

参数
Otherthe matrix to multiply by this.
返回
reference to this after multiply.

◆ operator*=() [2/2]

FORCEINLINE void FMatrix::operator*= ( float  Other)

Multiply this matrix by a weighting factor.

参数
otherThe weight.
返回
a reference to this after weighting.

◆ operator+()

FORCEINLINE FMatrix FMatrix::operator+ ( const FMatrix &  Other) const

Gets the result of adding a matrix to this.

参数
OtherThe Matrix to add.
返回
The result of addition.

◆ operator+=()

FORCEINLINE void FMatrix::operator+= ( const FMatrix &  Other)

Adds to this matrix.

参数
OtherThe matrix to add to this.
返回
Reference to this after addition.

◆ operator==()

bool FMatrix::operator== ( const FMatrix &  Other) const
inline

Checks whether two matrix are identical.

参数
OtherThe other matrix.
返回
true if two matrix are identical, otherwise false.

◆ Rotator()

CORE_API FRotator FMatrix::Rotator ( ) const
返回
rotator representation of this matrix

◆ RotDeterminant()

float FMatrix::RotDeterminant ( ) const
inline
返回
the determinant of rotation 3x3 matrix

◆ SetAxes()

void FMatrix::SetAxes ( FVector *  Axis0 = NULL,
FVector *  Axis1 = NULL,
FVector *  Axis2 = NULL,
FVector *  Origin = NULL 
)
inline

Update the axes of the matrix if any value is NULL do not update that axis

参数
Axis0set matrix row 0
Axis1set matrix row 1
Axis2set matrix row 2
Originset matrix row 3

◆ SetAxis()

void FMatrix::SetAxis ( int32  i,
const FVector &  Axis 
)
inline

set an axis of this matrix

参数
iindex into the axis of the matrix
Axisvector of the axis

◆ SetColumn()

void FMatrix::SetColumn ( int32  i,
FVector  Value 
)
inline

Set a column of this matrix

参数
iindex of the matrix column
Valuenew value of the column

◆ ToQuat()

CORE_API FQuat FMatrix::ToQuat ( ) const

Transform a rotation matrix into a quaternion.

警告
rotation part will need to be unit length for this to be right!

◆ ToString()

CORE_API FString FMatrix::ToString ( ) const

Get a textual representation of the vector.

返回
Text describing the vector.

◆ TransformVector()

FORCEINLINE FVector4 FMatrix::TransformVector ( const FVector &  V) const

Transform a direction vector - will not take into account translation part of the FMatrix.

If you want to transform a surface normal (or plane) and correctly account for non-uniform scaling you should use TransformByUsingAdjointT.

友元及相关函数文档

◆ operator<<

CORE_API FArchive & operator<< ( FArchive &  Ar,
FMatrix &  M 
)
friend

Serializes the Matrix.

参数
ArReference to the serialization archive.
MReference to the matrix being serialized.
返回
Reference to the Archive after serialization.

该结构体的文档由以下文件生成: