Navigation
Unreal Engine C++ API Reference > Runtime > Core > Math
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Math/TransformCalculus2D.h |
Include | #include "Math/TransformCalculus2D.h" |
Syntax
template<typename T>
class TQuat2
Remarks
Represents a 2D rotation as a complex number (analagous to quaternions). Rot(theta) == cos(theta) + i * sin(theta) General transformation follows complex number algebra from there. Does not use "spinor" notation using theta/2 as we don't need that decomposition for our purposes. This makes the implementation for straightforward and efficient for 2D.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TQuat2 () |
Ctor. initialize to an identity rotation. | |
![]() |
TQuat2
(
T RotRadians |
Ctor. initialize from a rotation in radians. | |
![]() |
TQuat2
(
const UE::Math::TVector2< VType >& InRot |
Ctor. initialize from an FVector2D, representing a complex number. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
TQuat2 | Concatenate
(
const TQuat2& RHS |
Transform 2 rotations defined by complex numbers: In imaginary land: (A + Bi) * (C + Di) == (AC - BD) + (AD + BC)i |
![]() ![]() |
const Vector2Type & | GetVector () |
Access to the underlying FVector2D that stores the complex number. |
![]() ![]() |
TQuat2 | Inverse () |
Invert the rotation defined by complex numbers: In imaginary land, an inverse is a complex conjugate, which is equivalent to reflecting about the X axis: Conj(A + Bi) == A - Bi |
![]() ![]() |
UE::Math::TVector2< ArgType > | TransformPoint
(
const UE::Math::TVector2< ArgType >& Point |
Transform a 2D point by the 2D complex number representing the rotation: In imaginary land: (x + yi) * (u + vi) == (xu - yv) + (xv + yu)i |
![]() ![]() |
UE::Math::TVector2< ArgType > | TransformVector
(
const UE::Math::TVector2< ArgType >& Vector |
Vector rotation is equivalent to rotating a point. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | operator!=
(
const TQuat2& Other |
Inequality. |
![]() ![]() |
bool | operator==
(
const TQuat2& Other |
Equality. |
Typedefs
Name | Description |
---|---|
FReal | |
Vector2Type |