Cogs.Core
RigidBodyComponent.cpp
1#include "RigidBodyComponent.h"
2
3#include "Foundation/Reflection/TypeDatabase.h"
4
5using namespace Cogs::Reflection;
6
8{
9 Field fields[] = {
10 Field(Name("mass"), &RigidBodyComponent::mass),
11 Field(Name("friction"), &RigidBodyComponent::friction),
12 Field(Name("rollingFriction"), &RigidBodyComponent::rollingFriction),
13 Field(Name("spinningFriction"), &RigidBodyComponent::spinningFriction),
14 Field(Name("linearDamping"), &RigidBodyComponent::linearDamping),
15 Field(Name("angularDamping"), &RigidBodyComponent::angularDamping),
16 Field(Name("restitution"), &RigidBodyComponent::restitution),
17 Field(Name("kinematic"), &RigidBodyComponent::kinematic),
18 Field(Name("ccdMotionThreshold"), &RigidBodyComponent::ccdMotionThreshold),
19 Field(Name("ccdSweptSphereRadius"), &RigidBodyComponent::ccdSweptSphereRadius),
20 };
21
22 TypeDatabase::createType<RigidBodyComponent>().setBase<Component>().setFields(fields);
23}
static void registerType()
Register the type in the type system.
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