Ark Server API (ASA) - Wiki
|
#include <TransformNonVectorized.h>
Public Types | |
using | FReal = T |
using | TransformVectorRegister = TVectorRegisterType<T> |
Public Attributes | |
friend | Z_Construct_UScriptStruct_FTransform3f_Statics |
friend | Z_Construct_UScriptStruct_FTransform3d_Statics |
friend | Z_Construct_UScriptStruct_FTransform_Statics |
Static Public Attributes | |
static const TTransform< T > | Identity |
Protected Attributes | |
TQuat< T > | Rotation |
TVector< T > | Translation |
TVector< T > | Scale3D |
Private Member Functions | |
FORCEINLINE bool | Private_RotationEquals (const TQuat< T > &InRotation, const FReal Tolerance=UE_KINDA_SMALL_NUMBER) const |
FORCEINLINE bool | Private_TranslationEquals (const TVector< T > &InTranslation, const FReal Tolerance=UE_KINDA_SMALL_NUMBER) const |
FORCEINLINE bool | Private_Scale3DEquals (const TVector< T > &InScale3D, const FReal Tolerance=UE_KINDA_SMALL_NUMBER) const |
Static Private Member Functions | |
static FORCEINLINE void | MultiplyUsingMatrixWithScale (TTransform< T > *OutTransform, const TTransform< T > *A, const TTransform< T > *B) |
static FORCEINLINE void | ConstructTransformFromMatrixWithDesiredScale (const TMatrix< T > &AMatrix, const TMatrix< T > &BMatrix, const TVector< T > &DesiredScale, TTransform< T > &OutTransform) |
static void | GetRelativeTransformUsingMatrixWithScale (TTransform< T > *OutTransform, const TTransform< T > *Base, const TTransform< T > *Relative) |
Friends | |
FArchive & | operator<< (FArchive &Ar, TTransform< T > &M) |
Definition at line 38 of file TransformNonVectorized.h.
Definition at line 44 of file TransformNonVectorized.h.
using UE::Math::TTransform< T >::TransformVectorRegister = TVectorRegisterType<T> |
Definition at line 45 of file TransformNonVectorized.h.
|
inline |
Default constructor.
Definition at line 113 of file TransformNonVectorized.h.
|
inlineexplicit |
Constructor with an initial translation
InTranslation | The value to use for the translation component |
Definition at line 125 of file TransformNonVectorized.h.
|
inlineexplicit |
Constructor with leaving uninitialized memory
Definition at line 136 of file TransformNonVectorized.h.
|
inlineexplicit |
Constructor with an initial rotation
InRotation | The value to use for rotation component |
Definition at line 155 of file TransformNonVectorized.h.
|
inlineexplicit |
Constructor with an initial rotation
InRotation | The value to use for rotation component (after being converted to a quaternion) |
Definition at line 168 of file TransformNonVectorized.h.
|
inline |
Constructor with all components initialized
InRotation | The value to use for rotation component |
InTranslation | The value to use for the translation component |
InScale3D | The value to use for the scale component |
Definition at line 183 of file TransformNonVectorized.h.
|
inline |
Constructor with all components initialized, taking a TRotator<T> as the rotation component
InRotation | The value to use for rotation component (after being converted to a quaternion) |
InTranslation | The value to use for the translation component |
InScale3D | The value to use for the scale component |
Definition at line 198 of file TransformNonVectorized.h.
|
inlineexplicit |
Constructor for converting a Matrix (including scale) into a TTransform<T>.
Definition at line 209 of file TransformNonVectorized.h.
|
inline |
Constructor that takes basis axes and translation
Definition at line 216 of file TransformNonVectorized.h.
|
inlineexplicit |
Definition at line 1215 of file TransformNonVectorized.h.
|
inline |
Accumulates another transform with this one, with a blending weight
Let SourceAtom = Atom * BlendWeight Rotation is accumulated multiplicatively (Rotation = SourceAtom.Rotation * Rotation). Translation is accumulated additively (Translation += SourceAtom.Translation) Scale3D is accumulated multiplicatively (Scale3D *= SourceAtom.Scale3D)
Note: Rotation will not be normalized! Will have to be done manually.
Atom | The other transform to accumulate into this one |
BlendWeight | The weight to multiply Atom by before it is accumulated. |
Definition at line 934 of file TransformNonVectorized.h.
|
inline |
Rotation is accumulated multiplicatively (Rotation = SourceAtom.Rotation * Rotation) Translation is accumulated additively (Translation += SourceAtom.Translation) Scale3D is accumulated multiplicatively (Scale3D *= SourceAtom.Scale3D)
SourceAtom | The other transform to accumulate into this one |
Definition at line 906 of file TransformNonVectorized.h.
|
inline |
Accumulates another transform with this one, with a blending weight
Let SourceAtom = Atom * BlendWeight Rotation is accumulated multiplicatively (Rotation = SourceAtom.Rotation * Rotation). Translation is accumulated additively (Translation += SourceAtom.Translation) Scale3D is accumulated assuming incoming scale is additive scale (Scale3D *= (1 + SourceAtom.Scale3D))
When we create additive, we create additive scale based on [TargetScale/SourceScale -1] because that way when you apply weight of 0.3, you don't shrink. We only saves the % of grow/shrink when we apply that back to it, we add back the 1, so that it goes back to it. This solves issue where you blend two additives with 0.3, you don't come back to 0.6 scale, but 1 scale at the end because [1 + [1-1]*0.3 + [1-1]*0.3] becomes 1, so you don't shrink by applying additive scale
Note: Rotation will not be normalized! Will have to be done manually.
Atom | The other transform to accumulate into this one |
BlendWeight | The weight to multiply Atom by before it is accumulated. |
Definition at line 1004 of file TransformNonVectorized.h.
|
inline |
Accumulates another transform with this one, with an optional blending weight
Rotation is accumulated additively, in the shortest direction (Rotation = Rotation +/- DeltaAtom.Rotation * Weight) Translation is accumulated additively (Translation += DeltaAtom.Translation * Weight) Scale3D is accumulated additively (Scale3D += DeltaAtom.Scale3D * Weight)
DeltaAtom | The other transform to accumulate into this one |
Weight | The weight to multiply DeltaAtom by before it is accumulated. |
Definition at line 960 of file TransformNonVectorized.h.
|
inline |
Adjusts the translation component of this transformation
DeltaTranslation | The translation to add in the following fashion: Translation += DeltaTranslation |
Definition at line 813 of file TransformNonVectorized.h.
|
inlinestatic |
Add the translations from two TTransform<T>s and return the result.
Definition at line 823 of file TransformNonVectorized.h.
|
static |
Definition at line 1223 of file TransformNonVectorized.h.
|
inlinestatic |
Definition at line 666 of file TransformNonVectorized.h.
|
inlinestatic |
Definition at line 678 of file TransformNonVectorized.h.
|
inlinestatic |
Definition at line 672 of file TransformNonVectorized.h.
|
inline |
Set this transform to the weighted blend of the supplied two transforms.
Definition at line 375 of file TransformNonVectorized.h.
|
inlinestatic |
Blends the Identity transform with a weighted source transform and accumulates that into a destination transform
DeltaAtom = Blend(Identity, SourceAtom, BlendWeight) FinalAtom.Rotation = DeltaAtom.Rotation * FinalAtom.Rotation FinalAtom.Translation += DeltaAtom.Translation FinalAtom.Scale3D *= DeltaAtom.Scale3D
FinalAtom | [in/out] The atom to accumulate the blended source atom into |
SourceAtom | The target transformation (used when BlendWeight = 1); this is modified during the process |
BlendWeight | The blend weight between Identity and SourceAtom |
Definition at line 1071 of file TransformNonVectorized.h.
|
inline |
Set this Transform to the weighted blend of it and the supplied Transform.
Definition at line 405 of file TransformNonVectorized.h.
|
inline |
Concatenates another rotation to this transformation
DeltaRotation | The rotation to concatenate in the following fashion: Rotation = Rotation * DeltaRotation |
Definition at line 803 of file TransformNonVectorized.h.
|
staticprivate |
Create a new transform from multiplications of given to matrices (AMatrix*BMatrix) using desired scale This is used by MultiplyUsingMatrixWithScale and GetRelativeTransformUsingMatrixWithScale This is only used to handle negative scale
AMatrix | first Matrix of operation |
BMatrix | second Matrix of operation |
DesiredScale | - there is no check on if the magnitude is correct here. It assumes that is correct. |
OutTransform | the constructed transform |
Definition at line 1268 of file TransformNonVectorized.h.
|
inline |
Checks the components for non-finite values (NaN or Inf).
Definition at line 598 of file TransformNonVectorized.h.
|
inline |
Copy rotation from another TTransform<T>.
Definition at line 848 of file TransformNonVectorized.h.
|
inline |
Sets the Rotation and Scale3D of this transformation from another transform
SrcBA | The transform to copy rotation and Scale3D from |
Definition at line 1133 of file TransformNonVectorized.h.
|
inline |
Copy scale from another TTransform<T>.
Definition at line 864 of file TransformNonVectorized.h.
|
inline |
Copy translation from another TTransform<T>.
Definition at line 794 of file TransformNonVectorized.h.
|
inline |
Sets the Translation and Scale3D of this transformation from another transform
SrcBA | The transform to copy translation and Scale3D from |
Definition at line 1147 of file TransformNonVectorized.h.
Debug purpose only
void UE::Math::TTransform< T >::DebugPrint | ( | ) | const |
Does a debugf of the contents of this Transform.
|
inline |
Definition at line 109 of file TransformNonVectorized.h.
|
inline |
Definition at line 108 of file TransformNonVectorized.h.
|
inline |
Definition at line 106 of file TransformNonVectorized.h.
|
inline |
Definition at line 107 of file TransformNonVectorized.h.
|
inline |
Definition at line 105 of file TransformNonVectorized.h.
|
inline |
Definition at line 704 of file TransformNonVectorized.h.
|
inline |
Definition at line 716 of file TransformNonVectorized.h.
|
inline |
Calculate the determinant of this transformation
Definition at line 582 of file TransformNonVectorized.h.
|
inline |
Definition at line 571 of file TransformNonVectorized.h.
|
inline |
same version of TMatrix<T>::GetMaximumAxisScale function
Definition at line 1569 of file TransformNonVectorized.h.
|
inline |
Definition at line 1578 of file TransformNonVectorized.h.
TTransform< T > UE::Math::TTransform< T >::GetRelativeTransform | ( | const TTransform< T > & | Other | ) | const |
TTransform< T > UE::Math::TTransform< T >::GetRelativeTransformReverse | ( | const TTransform< T > & | Other | ) | const |
|
staticprivate |
Create a new transform: OutTransform = Base * Relative(-1) using the matrix while keeping the scale that's given by Base and Relative Please note that this operation is a lot more expensive than normal GetRelativeTrnasform
OutTransform | pointer to transform that will store the result of Base * Relative(-1). |
BAse | Transform Base. |
Relative | Transform Relative. |
|
inline |
Returns the rotation component
Definition at line 1100 of file TransformNonVectorized.h.
|
inline |
Definition at line 885 of file TransformNonVectorized.h.
|
static |
Definition at line 1591 of file TransformNonVectorized.h.
|
inline |
Returns the Scale3D component
Definition at line 1122 of file TransformNonVectorized.h.
FORCEINLINE TTransform< T > UE::Math::TTransform< T >::GetScaled | ( | T | InScale | ) | const |
Apply Scale to this transform
Definition at line 1341 of file TransformNonVectorized.h.
FORCEINLINE TTransform< T > UE::Math::TTransform< T >::GetScaled | ( | TVector< T > | InScale | ) | const |
Apply Scale to this transform
Definition at line 1356 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::GetScaledAxis | ( | EAxis::Type | InAxis | ) | const |
Definition at line 1524 of file TransformNonVectorized.h.
|
inline |
Returns the translation component
Definition at line 1111 of file TransformNonVectorized.h.
|
inline |
Definition at line 884 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::GetUnitAxis | ( | EAxis::Type | InAxis | ) | const |
Definition at line 1541 of file TransformNonVectorized.h.
|
inline |
Definition at line 710 of file TransformNonVectorized.h.
bool UE::Math::TTransform< T >::InitFromString | ( | const FString & | InSourceString | ) |
Acceptable form: "%f,%f,%f|%f,%f,%f|%f,%f,%f"
|
inline |
Convert this Transform to inverse.
Definition at line 307 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::InverseTransformPosition | ( | const TVector< T > & | V | ) | const |
Inverts the transform and then transforms V - correctly handles scaling in this transform.
Definition at line 1444 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::InverseTransformPositionNoScale | ( | const TVector< T > & | V | ) | const |
Definition at line 1453 of file TransformNonVectorized.h.
FORCEINLINE TQuat< T > UE::Math::TTransform< T >::InverseTransformRotation | ( | const TQuat< T > & | Q | ) | const |
Inverse transform a rotation. For example if this is a LocalToWorld transform, InverseTransformRotation(Q) would transform Q from world to local space.
Definition at line 1484 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::InverseTransformVector | ( | const TVector< T > & | V | ) | const |
Transform a direction vector by the inverse of this transform - 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.
Definition at line 1462 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::InverseTransformVectorNoScale | ( | const TVector< T > & | V | ) | const |
Definition at line 1471 of file TransformNonVectorized.h.
|
inline |
Checks whether the rotation component is normalized or not
Definition at line 1054 of file TransformNonVectorized.h.
|
inline |
Definition at line 603 of file TransformNonVectorized.h.
|
inline |
Set the translation and Scale3D components of this transform to a linearly interpolated combination of two other transforms
Translation = FMath::Lerp(SourceAtom1.Translation, SourceAtom2.Translation, Alpha) Scale3D = FMath::Lerp(SourceAtom1.Scale3D, SourceAtom2.Scale3D, Alpha)
SourceAtom1 | The starting point source atom (used 100% if Alpha is 0) |
SourceAtom2 | The ending point source atom (used 100% if Alpha is 1) |
Alpha | The blending weight between SourceAtom1 and SourceAtom2 |
Definition at line 1031 of file TransformNonVectorized.h.
FORCEINLINE void UE::Math::TTransform< T >::Mirror | ( | EAxis::Type | MirrorAxis, |
EAxis::Type | FlipAxis ) |
Definition at line 1557 of file TransformNonVectorized.h.
|
static |
Create a new transform: OutTransform = A * B.
Order matters when composing transforms : A * B will yield a transform that logically first applies A then B to any subsequent transformation.
OutTransform | pointer to transform that will store the result of A * B. |
A | Transform A. |
B | Transform B. |
Returns Multiplied Transform of 2 TTransform<T>s
Definition at line 1299 of file TransformNonVectorized.h.
|
inline |
Scales the Scale3D component by a new factor
Scale3DMultiplier | The value to multiply Scale3D with |
Definition at line 777 of file TransformNonVectorized.h.
|
staticprivate |
Create a new transform: OutTransform = A * B using the matrix while keeping the scale that's given by A and B Please note that this operation is a lot more expensive than normal Multiply
Order matters when composing transforms : A * B will yield a transform that logically first applies A then B to any subsequent transformation.
OutTransform | pointer to transform that will store the result of A * B. |
A | Transform A. |
B | Transform B. |
Definition at line 1260 of file TransformNonVectorized.h.
|
inline |
Normalize the rotation component of this transformation
Definition at line 1043 of file TransformNonVectorized.h.
FORCEINLINE TTransform< T > UE::Math::TTransform< T >::operator* | ( | const TQuat< T > & | Other | ) | const |
Return a transform that is the result of this multiplied by another transform (made only from a rotation). Order matters when composing transforms : C = A * B will yield a transform C that logically first applies A then B to any subsequent transformation.
Other | other quaternion rotation by which to multiply. |
Definition at line 1506 of file TransformNonVectorized.h.
FORCEINLINE TTransform< T > UE::Math::TTransform< T >::operator* | ( | const TTransform< T > & | Other | ) | const |
Return a transform that is the result of this multiplied by another transform. Order matters when composing transforms : C = A * B will yield a transform C that logically first applies A then B to any subsequent transformation.
Other | other transform by which to multiply. |
Definition at line 1490 of file TransformNonVectorized.h.
|
inline |
Definition at line 457 of file TransformNonVectorized.h.
FORCEINLINE void UE::Math::TTransform< T >::operator*= | ( | const TQuat< T > & | Other | ) |
Sets this transform to the result of this multiplied by another transform (made only from a rotation). Order matters when composing transforms : C = A * B will yield a transform C that logically first applies A then B to any subsequent transformation.
Other | other quaternion rotation by which to multiply. |
Definition at line 1515 of file TransformNonVectorized.h.
FORCEINLINE void UE::Math::TTransform< T >::operator*= | ( | const TTransform< T > & | Other | ) |
Sets this transform to the result of this multiplied by another transform. Order matters when composing transforms : C = A * B will yield a transform C that logically first applies A then B to any subsequent transformation.
Other | other transform by which to multiply. |
Definition at line 1499 of file TransformNonVectorized.h.
|
inline |
Definition at line 462 of file TransformNonVectorized.h.
|
inline |
Quaternion addition is wrong here. This is just a special case for linear interpolation. Use only within blends!! Rotation part is NOT normalized!!
Definition at line 438 of file TransformNonVectorized.h.
|
inline |
Definition at line 443 of file TransformNonVectorized.h.
|
inlineprivate |
Definition at line 648 of file TransformNonVectorized.h.
|
inlineprivate |
Definition at line 658 of file TransformNonVectorized.h.
|
inlineprivate |
Definition at line 653 of file TransformNonVectorized.h.
FORCEINLINE void UE::Math::TTransform< T >::RemoveScaling | ( | FReal | Tolerance = UE_SMALL_NUMBER | ) |
Definition at line 1250 of file TransformNonVectorized.h.
|
inline |
Definition at line 686 of file TransformNonVectorized.h.
|
inline |
Definition at line 576 of file TransformNonVectorized.h.
|
inline |
Definition at line 698 of file TransformNonVectorized.h.
FORCEINLINE void UE::Math::TTransform< T >::ScaleTranslation | ( | const FReal & | Scale | ) |
Definition at line 1240 of file TransformNonVectorized.h.
FORCEINLINE void UE::Math::TTransform< T >::ScaleTranslation | ( | const TVector< T > & | InScale3D | ) |
Scale the translation part of the Transform by the supplied vector.
Definition at line 1231 of file TransformNonVectorized.h.
Definition at line 627 of file TransformNonVectorized.h.
Definition at line 42 of file Transform.h.
|
inline |
Sets the components
InRotation | The new value for the Rotation component |
InTranslation | The new value for the Translation component |
InScale3D | The new value for the Scale3D component |
Definition at line 738 of file TransformNonVectorized.h.
Definition at line 1156 of file TransformNonVectorized.h.
|
inline |
Sets the components to the identity transform: Rotation = (0,0,0,1) Translation = (0,0,0) Scale3D = (1,1,1)
Definition at line 753 of file TransformNonVectorized.h.
|
inline |
Sets the components to the 'additive' identity transform: Rotation = (0,0,0,1) Translation = (0,0,0) Scale3D = (0,0,0)
Definition at line 766 of file TransformNonVectorized.h.
|
inline |
Set the translation of this transformation
Definition at line 588 of file TransformNonVectorized.h.
|
inline |
Sets the rotation component
NewRotation | The new value for the rotation component |
Definition at line 841 of file TransformNonVectorized.h.
|
inline |
Definition at line 887 of file TransformNonVectorized.h.
|
inline |
Sets the Scale3D component
NewScale3D | The new value for the Scale3D component |
Definition at line 857 of file TransformNonVectorized.h.
void UE::Math::TTransform< T >::SetToRelativeTransform | ( | const TTransform< T > & | ParentTransform | ) |
Set current transform and the relative to ParentTransform. Equates to This = This->GetRelativeTransform(Parent), but saves the intermediate TTransform<T> storage and copy.
|
inline |
Sets the translation component
NewTranslation | The new value for the translation component |
Definition at line 787 of file TransformNonVectorized.h.
|
inline |
Sets both the translation and Scale3D components at the same time
NewTranslation | The new value for the translation component |
NewScale3D | The new value for the Scale3D component |
Definition at line 874 of file TransformNonVectorized.h.
|
inline |
Definition at line 886 of file TransformNonVectorized.h.
|
inlinestatic |
Subtract translations from two TTransform<T>s and return the difference.
Definition at line 832 of file TransformNonVectorized.h.
FString UE::Math::TTransform< T >::ToHumanReadableString | ( | ) | const |
Convert TTransform<T> contents to a string
|
inline |
Convert this Transform to matrix with scaling and compute the inverse of that.
Definition at line 298 of file TransformNonVectorized.h.
|
inline |
Convert this Transform to a transformation matrix, ignoring its scaling
Definition at line 320 of file TransformNonVectorized.h.
|
inline |
Convert this Transform to a transformation matrix with scaling.
Definition at line 241 of file TransformNonVectorized.h.
FString UE::Math::TTransform< T >::ToString | ( | ) | const |
FORCEINLINE TVector4< T > UE::Math::TTransform< T >::TransformFVector4 | ( | const TVector4< T > & | V | ) | const |
Transform TVector4<T>
Definition at line 1390 of file TransformNonVectorized.h.
FORCEINLINE TVector4< T > UE::Math::TTransform< T >::TransformFVector4NoScale | ( | const TVector4< T > & | V | ) | const |
Transform homogenous TVector4<T>, ignoring the scaling part of this transform
Definition at line 1369 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::TransformPosition | ( | const TVector< T > & | V | ) | const |
Definition at line 1411 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::TransformPositionNoScale | ( | const TVector< T > & | V | ) | const |
Definition at line 1419 of file TransformNonVectorized.h.
FORCEINLINE TQuat< T > UE::Math::TTransform< T >::TransformRotation | ( | const TQuat< T > & | Q | ) | const |
Transform a rotation. For example if this is a LocalToWorld transform, TransformRotation(Q) would transform Q from local to world space.
Definition at line 1478 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::TransformVector | ( | const TVector< T > & | V | ) | const |
Definition at line 1427 of file TransformNonVectorized.h.
FORCEINLINE TVector< T > UE::Math::TTransform< T >::TransformVectorNoScale | ( | const TVector< T > & | V | ) | const |
Definition at line 1435 of file TransformNonVectorized.h.
|
inline |
Definition at line 692 of file TransformNonVectorized.h.
Definition at line 619 of file TransformNonVectorized.h.
|
static |
The identity transformation (Rotation = TQuat<T>::Identity, Translation = TVector<T>::ZeroVector, Scale3D = (1,1,1)).
Definition at line 58 of file TransformNonVectorized.h.
Rotation of this transformation, as a quaternion.
Definition at line 49 of file TransformNonVectorized.h.
3D scale (always applied in local space) as a vector.
Definition at line 53 of file TransformNonVectorized.h.
Translation of this transformation, as a vector.
Definition at line 51 of file TransformNonVectorized.h.
friend UE::Math::TTransform< T >::Z_Construct_UScriptStruct_FTransform3d_Statics |
Definition at line 41 of file TransformNonVectorized.h.
friend UE::Math::TTransform< T >::Z_Construct_UScriptStruct_FTransform3f_Statics |
Definition at line 40 of file TransformNonVectorized.h.
friend UE::Math::TTransform< T >::Z_Construct_UScriptStruct_FTransform_Statics |
Definition at line 42 of file TransformNonVectorized.h.