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