Class Transform
Abstract base class for transform components. More...
#include <Transform.h>
Inherited by the following classes: Transform2D, Transform3D
Public Types
| Type | Name |
|---|---|
| enum | TransType Flags for enabling/disabling transform components. |
Public Attributes
| Type | Name |
|---|---|
| bool | is_TransF_changed = trueTransform matrix needs recomputation. |
| bool | is_Uniform_changed = trueUniform (non-scaled) transform needs recomputation. |
| bool | is_invTransF_changed = trueInverse transform needs recomputation. |
| bool | is_invUniform_changed = trueInverse uniform transform needs recomputation. |
| bool | use_position = { true }Enable position component in transform computation. |
| bool | use_rotation = { true }Enable rotation component in transform computation. |
| bool | use_scale = { true }Enable scale component in transform computation. |
Public Functions
| Type | Name |
|---|---|
| virtual bool | ApplyAllTransform () = 0 Recomputes transform and all parent transforms. |
| virtual bool | ApplyTransform (bool _forced=false) = 0 Recomputes transform matrix if dirty. |
| virtual bool | GetInvTransform () const = 0 Computes inverse transform matrix. |
| virtual void | UnsetParent (bool _keep_offset=true) = 0 Removes parent transform relationship. |
| void | UseTranformComp (bool _enable, TransType _type) Enables or disables specific transform components. |
| virtual int | _debug () const = 0 Debug utility for transform state inspection. |
Detailed Description
Transform provides common interface for position/rotation/scale manipulation and hierarchical relationships. Derived classes implement dimension-specific matrix mathematics (mat3 for 2D, mat4 for 3D).
Dirty Flag System: * is_TransF_changed: Position/rotation/scale modified * is_invTransF_changed: Inverse transform needs recomputation * is_Uniform_changed: Uniform (non-scaled) transform modified * is_invUniform_changed: Inverse uniform transform needs recomputation
Note:
Abstract class - instantiate Transform3D or Transform2D instead.
Public Types Documentation
enum TransType
Flags for enabling/disabling transform components.
enum Transform::TransType {
None,
Position = (1 << 0),
Rotation = (1 << 1),
Scale = (1 << 2)
};
Public Attributes Documentation
variable is_TransF_changed
Transform matrix needs recomputation.
bool Transform::is_TransF_changed;
variable is_Uniform_changed
Uniform (non-scaled) transform needs recomputation.
bool Transform::is_Uniform_changed;
variable is_invTransF_changed
Inverse transform needs recomputation.
bool Transform::is_invTransF_changed;
variable is_invUniform_changed
Inverse uniform transform needs recomputation.
bool Transform::is_invUniform_changed;
variable use_position
Enable position component in transform computation.
bool Transform::use_position;
variable use_rotation
Enable rotation component in transform computation.
bool Transform::use_rotation;
variable use_scale
Enable scale component in transform computation.
bool Transform::use_scale;
Public Functions Documentation
function ApplyAllTransform
Recomputes transform and all parent transforms.
virtual bool Transform::ApplyAllTransform () = 0
Returns:
True if any recomputation occurred
function ApplyTransform
Recomputes transform matrix if dirty.
virtual bool Transform::ApplyTransform (
bool _forced=false
) = 0
Parameters:
_forcedIf true, recompute even if not dirty
Returns:
True if recomputation occurred
function GetInvTransform
Computes inverse transform matrix.
virtual bool Transform::GetInvTransform () const = 0
Returns:
True if inverse was recomputed
function UnsetParent
Removes parent transform relationship.
virtual void Transform::UnsetParent (
bool _keep_offset=true
) = 0
Parameters:
_keep_offsetIf true, maintains world position; if false, resets to parent's origin
function UseTranformComp
Enables or disables specific transform components.
void Transform::UseTranformComp (
bool _enable,
TransType _type
)
Parameters:
_enableTrue to enable, false to disable_typeComponent type (Position, Rotation, Scale) as bit flags
Note:
Useful for locking axes or constraining transforms.
function _debug
Debug utility for transform state inspection.
virtual int Transform::_debug () const = 0
Returns:
Debug status code (implementation-defined)
The documentation for this class was generated from the following file src/compo/Transform.h