Provides transformation APIs.
Transformation APIs which act on the transform component referenced by CYIComponentPoolUID using the provided CYITransformSystem.
#include <scenetree/YiTransform.h>
◆ CYITransform() [1/2]
CYITransform::CYITransform |
( |
| ) |
|
◆ CYITransform() [2/2]
◆ GetAnchorPoint()
const glm::vec3& CYITransform::GetAnchorPoint |
( |
| ) |
const |
◆ GetLocalMatrix()
const glm::mat4x4& CYITransform::GetLocalMatrix |
( |
| ) |
const |
Get this transform component's local matrix.
- Note
- If the component is dirty, the local matrix will be updated before it is returned.
- Returns
- The local matrix.
◆ GetOrientation()
const glm::quat& CYITransform::GetOrientation |
( |
| ) |
const |
◆ GetParent()
Get this transform's parent.
- Parameters
-
parent | (out) This transform's parent. |
- Returns
- True if parent was returned, false if none (i.e. it is a top-level component) or could not be found.
◆ GetPosition()
const glm::vec3& CYITransform::GetPosition |
( |
| ) |
const |
◆ GetRotation()
const glm::vec3& CYITransform::GetRotation |
( |
| ) |
const |
◆ GetScale()
const glm::vec3& CYITransform::GetScale |
( |
| ) |
const |
◆ GetTransformComponent()
◆ GetTransformID()
Get this transform component's uid.
◆ GetTransformSystem()
◆ GetWorldMatrix()
const glm::mat4x4& CYITransform::GetWorldMatrix |
( |
| ) |
const |
Get this transform component's world matrix.
- Note
- If the component is dirty, the world matrix will be updated before it is returned.
- See also
- CYITransformSystem::UpdateWorldMatrix
- Returns
- The world matrix.
◆ IsValid()
bool CYITransform::IsValid |
( |
| ) |
const |
◆ RemoveDescendantsFromTransformSystem()
void CYITransform::RemoveDescendantsFromTransformSystem |
( |
| ) |
|
Remove this component's children from the transform system.
◆ RemoveFromTransformSystem()
void CYITransform::RemoveFromTransformSystem |
( |
| ) |
|
Remove this component and all its children from the transform system.
- Note
- Once removed from the transform system, this CYITransform becomes invalid.
◆ SetAnchorPoint()
bool CYITransform::SetAnchorPoint |
( |
glm::vec3 |
anchorPoint | ) |
|
Set this transform's anchor point.
- Returns
- False if the anchor point provided was the same as its previous value.
◆ SetOrientation()
bool CYITransform::SetOrientation |
( |
glm::quat |
orientation | ) |
|
Set this transform's orientation.
- Returns
- False if the orientation provided was the same as its previous value.
◆ SetParent()
bool CYITransform::SetParent |
( |
const CYITransform * |
pTransform | ) |
|
Assign this transform's parent.
- Parameters
-
pTransform | The parent transform to be assigned. If nullptr, this component will be a top-level component. |
- Returns
- True if parent was assigned successfully.
◆ SetPosition()
bool CYITransform::SetPosition |
( |
glm::vec3 |
position | ) |
|
Set this transform's position.
- Returns
- False if the position provided was the same as its previous value.
◆ SetRotation()
bool CYITransform::SetRotation |
( |
glm::vec3 |
eulerAngles | ) |
|
Set this transform's rotation.
- Returns
- False if the rotation provided was the same as its previous value.
◆ SetScale()
bool CYITransform::SetScale |
( |
glm::vec3 |
scale | ) |
|
Set this transform's scale.
- Returns
- False if the scale provided was the same as its previous value.
The documentation for this class was generated from the following file: