Cogs.Core
RigidBodyComponent.h
1#pragma once
2
3#include "Foundation/ComponentModel/Component.h"
4
5#include <glm/vec3.hpp>
6
7namespace Cogs
8{
9 namespace Core
10 {
12 {
13 public:
15 static void registerType();
16
17 float mass = 0;
18
19 float friction = 0.5f;
20
21 float rollingFriction = 0.1f;
22
23 float spinningFriction = 0.1f;
24
25 glm::vec3 linearFactor = glm::vec3(1, 1, 1);
26
27 float linearDamping = 0.1f;
28
29 glm::vec3 angularFactor = glm::vec3(1, 1, 1);
30
31 float angularDamping = 0.1f;
32
33 float restitution = 0.0f;
34
35 bool kinematic = false;
36
37 float ccdMotionThreshold = 0;
38
39 float ccdSweptSphereRadius = 0;
40 };
41 }
42}
43
44template<> inline Cogs::StringView getName<Cogs::Core::RigidBodyComponent>() { return "RigidBodyComponent"; }
Base class for Component instances.
Definition: Component.h:143
static void registerType()
Register the type in the type system.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23