Cogs.Core
RiserTensionerComponent.h
1
2#include "EntityDefinition.h"
3#include "Components/Core/DynamicComponent.h"
4
5#include <glm/vec3.hpp>
6
7namespace Cogs
8{
9 namespace Core
10 {
11 class Context;
12
14 {
15 public:
17 {
18 this->setChanged();
19 }
20
21 glm::vec3 topOffset;
22 glm::vec3 bottomOffset;
23
24 float cylinderLength = 0.0f;
25 float cylinderRadius = 0.0f;
26 float cylinderInnerRadius = 0.0f;
27 float cylinderBaseRadius = 0.0f;
28 float cylinderBaseLength = 0.0f;
29 float cylinderHeadRadius = 0.0f;
30 float cylinderHeadLength = 0.0f;
31
32 float rodLength = 0.0f;
33 float rodRadius = 0.0f;
34
36
37 float startDepth = 0.0f;
38 float endDepth = 100.0f;
39
40 static void registerType();
41
42 void initialize(Context * context);
43 void update();
44 void updateChildren();
45
46 EntityPtr innerShape;
47 EntityPtr outerShape;
48
49 EntityPtr trajectory;
50 };
51 }
52}
53
54template<> inline Cogs::StringView getName<Cogs::Core::RiserTensionerComponent>() { return "RiserTensionerComponent"; }
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 cylinderHeadRadius
Radius of the cylinder head.
float cylinderRadius
Radius of the main part of the outer cylinder.
float startDepth
Start depth along trajectory.
float cylinderHeadLength
Length of the cylinder head part (measured from the end of the cylinder).
glm::vec3 topOffset
Offset of top from trajectory position.
float cylinderBaseRadius
Radius of the cylinder base.
float cylinderInnerRadius
Inner radius of the cylinder.
float cylinderLength
Length of the entire outer cylinder.
float cylinderBaseLength
Length of the cylinder base part (measured from the start of the cylinder).
float endDepth
End depth along trajectory.
glm::vec3 bottomOffset
Offset of bottom from trajectory position.
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