Represents a transformation applied to the vertices of an element on the UI. It generates a matrix when applied. This matrix is then applied to any existing matrix (the current top of a stack) and the result is pushed to the same stack. The matrix at the top of the stack is the one which is actually applied to elements.
Public Member Functions | |
Transformation () | |
Transformation (Matrix4x4 matrix) | |
void | RecalculateMatrix (ComputedStyle style, LayoutBox box) |
Recalculates the matrices if this transformation has changed. More... | |
void | SetOriginOffset (Value value) |
The position of the origin relative to the top left corner of the element. More... | |
Vector3 | Apply (Vector4 point) |
Applies this transformation to the given vertex. More... | |
Vector3 | ApplyInverse (Vector4 point) |
Applies this transformation to the given vertex. More... | |
Public Attributes | |
Transformation | Parent |
The parent transform, if any. More... | |
Properties | |
Matrix4x4 | Matrix [get] |
Read only version of the fully resolved matrix - parent one included. More... | |
Matrix4x4 | LocalMatrix [get] |
Read only version of the matrix that represents this transformation. More... | |
bool | Changed [get] |
True if any property of this transformation changed. More... | |
int | OriginPosition [get, set] |
The PositionMode of the origin. May be fixed (i.e. in exact screen pixels) or relative to the element that this transformation is on. More... | |
Vector3 | Scale [get, set] |
A scale transformation to apply (post process). More... | |
Vector3 | Translate [get, set] |
A translate transformation to apply (post process). More... | |
Quaternion | Rotation [get, set] |
A rotation to apply (post process). More... | |
Matrix4x4 | Skew [get, set] |
A skew to apply (post process). More... | |
Matrix4x4 | RawMatrix [get, set] |
A raw matrix to apply (originates from transform: CSS). Post process. More... | |
Private Member Functions | |
Vector3 | CalculateOrigin (ComputedStyle relativeTo, LayoutBox box) |
Calculates where the transformation origin should go in screen space. More... | |
Private Attributes | |
bool | HasRawMatrix |
Has this transformation got an active raw matrix? More... | |
bool | _Changed |
True if any component of this transformation changed. More... | |
Matrix4x4 | _RawMatrix =Matrix4x4.identity |
A raw matrix to apply. More... | |
Vector3 | _Origin |
The location of the transform origin. More... | |
Matrix4x4 | _Matrix |
The fully resolved matrix (i.e. the parent matrix and my local one). More... | |
Vector3 | _Translate |
A translation to apply in world units. More... | |
Quaternion | _Rotation =Quaternion.identity |
Rotation to apply. More... | |
Value | _OriginOffset =null |
The location of the origin relative to the top corner of the element this transformation is on. More... | |
Matrix4x4 | _LocalMatrix |
The matrix that represents only this transformation. More... | |
Vector3 | _Scale =Vector3.one |
Scale to apply. More... | |
int | _OriginPosition =PositionMode.Relative |
The location of the origin. May be relative (to this element) or fixed (fixed place on the screen). More... | |
|
inline |
|
inline |
|
inline |
Applies this transformation to the given vertex.
point | The vertex to transform. |
|
inline |
Applies this transformation to the given vertex.
point | The vertex to transform. |
|
inlineprivate |
Calculates where the transformation origin should go in screen space.
relativeTo | The computed style of the element that the origin will be relative to if the origin position is 'Relative' |
|
inline |
Recalculates the matrices if this transformation has changed.
|
inline |
The position of the origin relative to the top left corner of the element.
|
private |
True if any component of this transformation changed.
|
private |
The matrix that represents only this transformation.
|
private |
The fully resolved matrix (i.e. the parent matrix and my local one).
|
private |
The location of the transform origin.
|
private |
The location of the origin relative to the top corner of the element this transformation is on.
|
private |
The location of the origin. May be relative (to this element) or fixed (fixed place on the screen).
|
private |
A raw matrix to apply.
|
private |
Rotation to apply.
|
private |
Scale to apply.
|
private |
A translation to apply in world units.
|
private |
Has this transformation got an active raw matrix?
Transformation Css.Transformation.Parent |
The parent transform, if any.
|
get |
True if any property of this transformation changed.
|
get |
Read only version of the matrix that represents this transformation.
|
get |
Read only version of the fully resolved matrix - parent one included.
|
getset |
The PositionMode of the origin. May be fixed (i.e. in exact screen pixels) or relative to the element that this transformation is on.
|
getset |
A raw matrix to apply (originates from transform: CSS). Post process.
|
getset |
A rotation to apply (post process).
|
getset |
A scale transformation to apply (post process).
|
getset |
A skew to apply (post process).
|
getset |
A translate transformation to apply (post process).