Ark Server API (ASA) - Wiki
|
#include <TransformCalculus2D.h>
Public Types | |
using | FReal = T |
using | Vector2Type = UE::Math::TVector2<T> |
using | Matrix2Type = TMatrix2x2<T> |
Private Attributes | |
Matrix2Type | M |
Vector2Type | Trans |
Support for generalized 2D affine transforms. Implemented as a 2x2 transform followed by translation. In matrix form: [A B 0] [C D 0] [X Y 1]
Definition at line 643 of file TransformCalculus2D.h.
Definition at line 648 of file TransformCalculus2D.h.
using TTransform2< T >::Matrix2Type = TMatrix2x2<T> |
Definition at line 650 of file TransformCalculus2D.h.
using TTransform2< T >::Vector2Type = UE::Math::TVector2<T> |
Definition at line 649 of file TransformCalculus2D.h.
|
inline |
Initialize the transform using an identity matrix and a translation.
Definition at line 654 of file TransformCalculus2D.h.
|
inlineexplicit |
Initialize the transform using a uniform scale and a translation.
Definition at line 661 of file TransformCalculus2D.h.
|
inlineexplicit |
Initialize the transform using a 2D scale and a translation.
Definition at line 668 of file TransformCalculus2D.h.
|
inlineexplicit |
Initialize the transform using a 2D shear and a translation.
Definition at line 675 of file TransformCalculus2D.h.
|
inlineexplicit |
Initialize the transform using a 2D rotation and a translation.
Definition at line 682 of file TransformCalculus2D.h.
|
inlineexplicit |
Initialize the transform using a general 2x2 transform and a translation.
Definition at line 689 of file TransformCalculus2D.h.
|
inline |
Concatenates two transforms. Result is equivalent to transforming first by this, followed by RHS. Concat(A,B) == (P * MA + TA) * MB + TB == (P * MA * MB) + TA*MB + TB NewM == MA * MB NewT == TA * MB + TB
Definition at line 719 of file TransformCalculus2D.h.
|
inline |
Access to the 2x2 transform
Definition at line 774 of file TransformCalculus2D.h.
Access to the translation
Definition at line 777 of file TransformCalculus2D.h.
|
inline |
Inverts a transform. So a transform from space A to space B results in a transform from space B to space A. Since this class applies the 2x2 transform followed by translation, our inversion logic needs to be able to recast the result as a M * T. It does it using the following identity: (M * T)^-1 == T^-1 * M^-1
In homogeneous form, we represent our affine transform like so: M * T [A B 0] [1 0 0] [A B 0] [C D 0] * [0 1 0] = [C D 0]. This class simply decomposes the 2x2 transform and translation. [0 0 1] [X Y 1] [X Y 1]
But if we were applying the transforms in reverse order (as we need to for the inverse identity above): T^-1 * M^-1 [1 0 0] [A B 0] [A B 0] where [X' Y'] = [X Y] * [A B] [0 1 0] * [C D 0] = [C D 0] [C D] [X Y 1] [0 0 1] [X' Y' 1]
This can be conceptualized by seeing that a translation effectively defines a new local origin for that frame of reference. Since there is a 2x2 transform AFTER that, the concatenated frame of reference has an origin that is the old origin transformed by the 2x2 transform.
In the last equation: We know that [X Y] is the translation induced by inverting T, or -Translate. We know that [[A B][C D]] == Inverse(M), so we can represent T^-1 * M^-1 as M'* T' where: M' == Inverse(M) T' == Inverse(Translate) * Inverse(M)
Definition at line 754 of file TransformCalculus2D.h.
|
inline |
Specialized function to determine if a transform is precisely the identity transform. Uses exact float comparison, so rounding error is not considered.
Definition at line 785 of file TransformCalculus2D.h.
|
inline |
Inequality.
Definition at line 768 of file TransformCalculus2D.h.
|
inline |
Equality.
Definition at line 762 of file TransformCalculus2D.h.
|
inline |
Definition at line 780 of file TransformCalculus2D.h.
|
inline |
Converts this affine 2D Transform into an affine 3D transform.
Definition at line 793 of file TransformCalculus2D.h.
|
inline |
2D transformation of a point. Transforms position, rotation, and scale.
Definition at line 698 of file TransformCalculus2D.h.
|
inline |
2D transformation of a vector. Transforms rotation and scale.
Definition at line 707 of file TransformCalculus2D.h.
|
private |
Definition at line 807 of file TransformCalculus2D.h.
|
private |
Definition at line 808 of file TransformCalculus2D.h.