|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Where an entity is in space: its pose (position and orientation) and its scale. More...
#include <headers/guillaume/components/transform.hpp>


Public Member Functions | |
| Transform (void)=default | |
| Default constructor for the Transform component. | |
| ~Transform (void)=default | |
| Default destructor for the Transform component. | |
| Transform & | setPose (const utility::graphic::PoseF &pose) |
| Move and orient the entity. | |
| Transform & | setScale (const utility::graphic::ScaleF &scale) |
| Store a scale for the entity. | |
| utility::graphic::PoseF | getPose (void) const |
| Get where the entity is. | |
| utility::graphic::ScaleF | getScale (void) const |
| Get the stored scale. | |
| Public Member Functions inherited from guillaume::ecs::Component | |
| bool | hasChanged (void) const |
| Tell whether a value of the component changed since the flags were last reset (the end of the previous frame). | |
| void | setHasChanged (bool hasChanged) |
| Raise or lower the changed flag. | |
| Component (void)=default | |
| Create a component that is not marked as changed. | |
| virtual | ~Component (void)=default |
| Virtual destructor, so components can be destroyed through the base class. | |
Where an entity is in space: its pose (position and orientation) and its scale.
The position is the top-left corner of the entity's components::Bound, in dp; X grows to the right and Y downwards. The render systems draw the bound from that corner, rotated by the orientation.
Written by whoever places the entity: the application for a root entity, systems::Layout for the children listed in a components::Layout, and each widget system for the children it places itself. Read by every render system, by the hit-testing of the input systems and by systems::Clip.
Definition at line 63 of file transform.hpp.
| utility::graphic::PoseF guillaume::components::Transform::getPose | ( | void | ) | const |
Get where the entity is.
Definition at line 47 of file transform.cpp.

| utility::graphic::ScaleF guillaume::components::Transform::getScale | ( | void | ) | const |
Get the stored scale.
Definition at line 52 of file transform.cpp.
| Transform & guillaume::components::Transform::setPose | ( | const utility::graphic::PoseF & | pose | ) |
Move and orient the entity.
Marks the component changed only when pose differs from the stored one.
| pose | The position of the top-left corner of the bound, in dp, and the orientation. |
Definition at line 27 of file transform.cpp.


| Transform & guillaume::components::Transform::setScale | ( | const utility::graphic::ScaleF & | scale | ) |
Store a scale for the entity.
Marks the component changed only when scale differs from the stored one. The systems of the library do not apply it.
| scale | The scale factor per axis. |
Definition at line 37 of file transform.cpp.
