Cogs.Core
MotionComponent.cpp
1#include "MotionComponent.h"
2
3#include "Types.h"
4
5using namespace Cogs::Reflection;
6
8{
9 Field fields[] = {
10 { "velocity", &MotionComponent::velocity },
11 { "angularVelocity", &MotionComponent::angularVelocity },
12 };
13
14 DynamicComponent::registerDerivedType<MotionComponent>().setFields(fields);
15}
Field definition describing a single data member of a data structure.
Definition: Field.h:68
Contains reflection support.
Definition: Component.h:11
static void registerType()
Register the type in the type system.
glm::vec3 angularVelocity
Angular velocity.
glm::vec3 velocity
Linear velocity.