Cogs.Core
Extensions
Physics
Source
RigidBodyComponent.h
1
#pragma once
2
3
#include "Foundation/ComponentModel/Component.h"
4
5
#include <glm/vec3.hpp>
6
7
namespace
Cogs
8
{
9
namespace
Core
10
{
11
class
RigidBodyComponent
:
public
ComponentModel::Component
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
44
template
<>
inline
Cogs::StringView
getName<Cogs::Core::RigidBodyComponent>() {
return
"RigidBodyComponent"
; }
Cogs::ComponentModel::Component
Base class for Component instances.
Definition:
Component.h:143
Cogs::Core::RigidBodyComponent
Definition:
RigidBodyComponent.h:12
Cogs::Core::RigidBodyComponent::registerType
static void registerType()
Register the type in the type system.
Definition:
RigidBodyComponent.cpp:7
Cogs::StringView
Provides a weakly referenced view over the contents of a string.
Definition:
StringView.h:24
Cogs
Contains all Cogs related functionality.
Definition:
FieldSetter.h:23
Generated by
1.9.6