Engine » Transform module

Adds transform components which assign positions, rotations and scaling to entities.

This plugin operates on entities with LocalToWorld and LocalToParent components, and any combination of the Position, Rotation and Scale components. For example, if you have an entity which doesn't need rotation, but has a position and a scale, you do not need to add the Rotation component, and its transform will still be updated.

Components

  • LocalToParent - holds the local to parent transform matrix.
  • LocalToWorld - holds the local to world transform matrix.
  • Position - holds the position of an entity.
  • Rotation - holds the rotation of an entity.
  • Scale - holds the scaling of an entity.

Relations

  • ChildOf - tree like relation which indicates an entity is a child of another.

Files

file child_of.hpp
Relation cubos::engine::ChildOf.
file local_to_parent.hpp
Component cubos::engine::LocalToParent.
file local_to_world.hpp
Component cubos::engine::LocalToWorld.
file plugin.hpp
Plugin entry point.
file position.hpp
Component cubos::engine::Position.
file rotation.hpp
Component cubos::engine::Rotation.
file scale.hpp
Component cubos::engine::Scale.

Classes

struct cubos::engine::ChildOf
Tree relation which indicates the 'from' entity is a child of the 'to' entity.
struct cubos::engine::LocalToParent
Component which stores the transformation matrix of an entity, from local to parent space.
struct cubos::engine::LocalToWorld
Component which stores the transformation matrix of an entity, from local to world space.
struct cubos::engine::Position
Component which assigns a position to an entity.
struct cubos::engine::Rotation
Component which assigns a rotation to an entity.
struct cubos::engine::Scale
Component which assigns a uniform scale to an entity.

Functions

auto transformPlugin(Cubos& cubos) -> CUBOS_ENGINE_API void
Plugin entry function.

Function documentation

CUBOS_ENGINE_API void transformPlugin(Cubos& cubos)

Plugin entry function.

Parameters
cubos Cubos main class