ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
Loading...
Searching...
No Matches
ToyMaker::Transform Struct Reference

The transform component, which moves the vertices of a model to their world space coordinates during rendering. More...

#include <scene_components.hpp>

Public Member Functions

glm::mat4 getMatrixTranslation () const
 Isolates the world-relative translation matrix associated with this transform.
glm::mat4 getMatrixRotation () const
 Isolates the world-relative rotation matrix associated with this transform.
glm::mat4 getMatrixScale () const
 Isolates the world-relative scale matrix associated with this transform.

Static Public Member Functions

static std::string getComponentTypeName ()
 Gets the component type string for this object.

Public Attributes

glm::mat4 mModelMatrix { 1.f }
 The actual currently cached model matrix for this entity.
TransformComponentSet mInheritedComponents { TRANSFORMCOMPONENT_TRANSLATION | TRANSFORMCOMPONENT_ROTATION | TRANSFORMCOMPONENT_SCALE }
 Field specifying which aspects of its parent's transform this object's transform is specified relative to.
TransformInheritMode mInheritMode { TransformInheritMode::PARENT }
 Field specifying which coordinate system this object's transform is specified relative to.

Detailed Description

The transform component, which moves the vertices of a model to their world space coordinates during rendering.

Computed based on the parameters specified in the placement component along with transforms of objects higher up in the scene hierarchy.

See also
ECSWorld::registerComponentTypes()

Member Function Documentation

◆ getComponentTypeName()

std::string ToyMaker::Transform::getComponentTypeName ( )
inlinestatic

Gets the component type string for this object.

Returns
std::string This object's component type string.

The documentation for this struct was generated from the following file: