![]() |
Copperfield Engine 0.1
C++ Game Engine
|
Component used to give a position, rotation, and scale to an entity. More...
#include <default_components.hpp>
Public Member Functions | |
| coma::Vec3 | forward () const |
| Retrieves direction the entity is looking at. More... | |
| coma::Vec3 | up () const |
| Retrieves world up vector. More... | |
| coma::Vec3 | right () const |
| Retrieves direction pointing to the right of the entity. More... | |
| TransformCmp (const coma::Vec3 &position, const coma::Vec3 &rotation={0.0f, 180.0f, 0.0f}, const coma::Vec3 &scale={1.0f, 1.0f, 1.0f}) | |
| Creates a TransformCmp. More... | |
| coma::Mat4 | getMatrix () const |
| Calculates the transform matrix using position_, rotation_, and scale_. More... | |
Public Attributes | |
| coma::Vec3 | position_ = {0.0f,0.0f,0.0f} |
| Position in the world relative to the parent's position. | |
| coma::Vec3 | rotation_ = {0.0f,0.0f,0.0f} |
| Rotation in the world relative to the parent's rotation. | |
| coma::Vec3 | scale_ = {1.0f,1.0f,1.0f} |
| Scale in the world relative to the parent's scale. | |
Component used to give a position, rotation, and scale to an entity.
|
inlineexplicit |
Creates a TransformCmp.
|
inline |
Retrieves direction the entity is looking at.
|
inline |
|
inline |
Retrieves direction pointing to the right of the entity.
|
inline |
Retrieves world up vector.