Cogs.Core
TransformComponent.cpp
1#include "TransformComponent.h"
2
3#include "Types.h"
4
5using namespace Cogs::Reflection;
6
8 coordinates(0, 0, 0),
9 position(0, 0, 0),
10 rotation(1, 0, 0, 0),
11 scale(1, 1, 1)
12{
13
14}
15
17{
18 Field fields[] = {
25 };
26
27 TypeDatabase::createType<TransformComponent>().setBase<Component>().setFields(fields);
28}
uint32_t transformFlags
Transform flags.
glm::vec3 scale
Scale factor to apply to each of the axes.
TransformComponent()
Constructs a new transform component.
glm::mat4 transform
Complete transformation.
glm::dvec3 coordinates
Global coordinates.
glm::quat rotation
Rotation given as a quaternion.
static void registerType()
Register the type in the type system.
glm::vec3 position
Local position relative to the global coordinates, or the parent coordinate system if the parent fiel...
Field definition describing a single data member of a data structure.
Definition: Field.h:68
Contains reflection support.
Definition: Component.h:11
Represents an unique name.
Definition: Name.h:70