Navigation
API > API/Runtime > API/Runtime/Core
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.
| Name | TQuat2 |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Math/TransformCalculus2D.h |
| Include Path | #include "Math/TransformCalculus2D.h" |
Syntax
template<typename T>
class TQuat2
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TQuat2 () |
Ctor. initialize to an identity rotation. | Math/TransformCalculus2D.h | |
TQuat2
(
T RotRadians |
Ctor. initialize from a rotation in radians. | Math/TransformCalculus2D.h | |
TQuat2
(
const UE::Math::TVector2< VType >& InRot |
Ctor. initialize from an FVector2D, representing a complex number. | Math/TransformCalculus2D.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FReal | T | Math/TransformCalculus2D.h | |
| Vector2Type | UE::Math::TVector2< T > | Math/TransformCalculus2D.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Rot | Vector2Type | Underlying storage of the rotation (X = cos(theta), Y = sin(theta). | Math/TransformCalculus2D.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TQuat2 Concatenate
(
const TQuat2& RHS |
Transform 2 rotations defined by complex numbers: In imaginary land: (A + Bi) * (C + Di) == (AC - BD) + (AD + BC)i | Math/TransformCalculus2D.h | |
const Vector2Type & GetVector() |
Access to the underlying FVector2D that stores the complex number. | Math/TransformCalculus2D.h | |
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 | Math/TransformCalculus2D.h | |
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 | Math/TransformCalculus2D.h | |
UE::Math::TVector2< ArgType > TransformVector
(
const UE::Math::TVector2< ArgType >& Vector |
Vector rotation is equivalent to rotating a point. | Math/TransformCalculus2D.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const TQuat2& Other |
Inequality. | Math/TransformCalculus2D.h | |
bool operator==
(
const TQuat2& Other |
Equality. | Math/TransformCalculus2D.h |