The transform system maintains a component pool of CYITransformComponent data.
The transform system maintains depth-first sorting of component transform data, updating local & world matrices when dirty.
#include <scenetree/YiTransformSystem.h>
Public Member Functions | |
CYITransformSystem () | |
bool | IsValid (CYIComponentPoolUID transformID) const |
bool | Update () |
void | UpdateLocalMatrix (CYIComponentPoolUID transformID) |
void | UpdateWorldMatrix (CYIComponentPoolUID transformID) |
CYIComponentPoolUID | CreateTransform () |
CYIComponentPoolUID | CreateTransform (CYIComponentPoolUID parentID) |
const CYITransformComponent * | GetTransform (CYIComponentPoolUID transformID) const |
CYITransformComponent * | GetTransform (CYIComponentPoolUID transformID) |
void | RemoveSubtree (CYIComponentPoolUID subtreeRootID) |
void | RemoveDescendants (CYIComponentPoolUID transformID) |
bool | SetParent (CYIComponentPoolUID transformID, CYIComponentPoolUID parentID) |
void | SetDirty (CYIComponentPoolUID transformID) |
void | DirtyAll () |
Friends | |
class | CYITransform |
class | TransformSystemTest |
CYITransformSystem::CYITransformSystem | ( | ) |
CYIComponentPoolUID CYITransformSystem::CreateTransform | ( | ) |
Create a new transform component parented to root.
CYIComponentPoolUID CYITransformSystem::CreateTransform | ( | CYIComponentPoolUID | parentID | ) |
Create a new transform component and parent it to parentID.
void CYITransformSystem::DirtyAll | ( | ) |
Mark all components dirty.
const CYITransformComponent* CYITransformSystem::GetTransform | ( | CYIComponentPoolUID | transformID | ) | const |
Get a pointer to the transform component given its uid.
transformID | The uid of the component to be retrieved. |
CYITransformComponent* CYITransformSystem::GetTransform | ( | CYIComponentPoolUID | transformID | ) |
Get a pointer to the transform component given its uid.
transformID | The uid of the component to be retrieved. |
bool CYITransformSystem::IsValid | ( | CYIComponentPoolUID | transformID | ) | const |
void CYITransformSystem::RemoveDescendants | ( | CYIComponentPoolUID | transformID | ) |
Remove all children of a given component.
transformID | The uid of the component whose children will be removed. |
void CYITransformSystem::RemoveSubtree | ( | CYIComponentPoolUID | subtreeRootID | ) |
Remove a component and all its children.
subtreeRootID | The uid of the root component to be removed. |
void CYITransformSystem::SetDirty | ( | CYIComponentPoolUID | transformID | ) |
Mark the specified component and all its children dirty.
bool CYITransformSystem::SetParent | ( | CYIComponentPoolUID | transformID, |
CYIComponentPoolUID | parentID | ||
) |
Assign a component's parent.
transformID | The uid of the component to be re-parented. |
parentID | The uid of the parent component to be assigned. |
bool CYITransformSystem::Update | ( | ) |
Update the local and world transform matrices for all dirty components.
void CYITransformSystem::UpdateLocalMatrix | ( | CYIComponentPoolUID | transformID | ) |
Update the local matrix for the specified component.
transformID | The uid of the component to be updated. |
void CYITransformSystem::UpdateWorldMatrix | ( | CYIComponentPoolUID | transformID | ) |
Update the local and world matrices for the specified component and all dirty parent components.
transformID | The uid of the component to be updated. |
|
friend |
|
friend |