Cogs.Core
TensionRingComponent.h
1
2#include "EntityPtr.h"
3#include "Components/Core/DynamicComponent.h"
4
5namespace Cogs
6{
7 namespace Core
8 {
9 class Context;
10
12 {
13 public:
15 {
16 this->setChanged();
17 }
18
19 float extensionRadius = 1.3f;
20 float splitDistance = 0.0f;
21 float splitAngle = 0.0f;
22
23 float innerRadius = 0.8f;
24 float outerRadius = 1.0f;
25
26 float startDepth = 0.0f;
27 float endDepth = 100.0f;
28
29 float startAngle = 0.0f;
30
31 static void registerType();
32
33 void initialize(Context * context);
34 void update();
35 void updateChildren();
36
37 EntityPtr shape1;
38 EntityPtr shape2;
39
40 EntityPtr trajectory1;
41 EntityPtr trajectory2;
42 };
43 }
44}
45
46template<> inline Cogs::StringView getName<Cogs::Core::TensionRingComponent>() { return "TensionRingComponent"; }
void setChanged()
Sets the component to the ComponentFlags::Changed state with carry.
Definition: Component.h:202
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Base class for components implementing dynamic behavior.
float endDepth
End depth along trajectory.
float startDepth
Start depth along trajectory.
float outerRadius
Outer radius of the tension ring.
float extensionRadius
Outermost extended radius of the ring.
float innerRadius
Inner radius of the tension ring.
float splitAngle
Specify at which angle in radians the ring should be split in two.
float splitDistance
The distance between the two halves of the ring if it is split in two.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
Definition: EntityPtr.h:12
Contains all Cogs related functionality.
Definition: FieldSetter.h:23