Cogs.Core
Extensions
Drilling
Source
RiserTensionerComponent.h
1
2
#include "EntityDefinition.h"
3
#include "Components/Core/DynamicComponent.h"
4
5
#include <glm/vec3.hpp>
6
7
namespace
Cogs
8
{
9
namespace
Core
10
{
11
class
Context;
12
13
class
RiserTensionerComponent
:
public
DynamicComponent
14
{
15
public
:
16
RiserTensionerComponent
()
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
35
EntityPtr
rodMaterial
;
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
54
template
<>
inline
Cogs::StringView
getName<Cogs::Core::RiserTensionerComponent>() {
return
"RiserTensionerComponent"
; }
Cogs::ComponentModel::Component::setChanged
void setChanged()
Sets the component to the ComponentFlags::Changed state with carry.
Definition:
Component.h:202
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::DynamicComponent
Base class for components implementing dynamic behavior.
Definition:
DynamicComponent.h:31
Cogs::Core::RiserTensionerComponent
Definition:
RiserTensionerComponent.h:14
Cogs::Core::RiserTensionerComponent::cylinderHeadRadius
float cylinderHeadRadius
Radius of the cylinder head.
Definition:
RiserTensionerComponent.h:29
Cogs::Core::RiserTensionerComponent::cylinderRadius
float cylinderRadius
Radius of the main part of the outer cylinder.
Definition:
RiserTensionerComponent.h:25
Cogs::Core::RiserTensionerComponent::rodRadius
float rodRadius
Radius of the rod.
Definition:
RiserTensionerComponent.h:33
Cogs::Core::RiserTensionerComponent::startDepth
float startDepth
Start depth along trajectory.
Definition:
RiserTensionerComponent.h:37
Cogs::Core::RiserTensionerComponent::cylinderHeadLength
float cylinderHeadLength
Length of the cylinder head part (measured from the end of the cylinder).
Definition:
RiserTensionerComponent.h:30
Cogs::Core::RiserTensionerComponent::topOffset
glm::vec3 topOffset
Offset of top from trajectory position.
Definition:
RiserTensionerComponent.h:21
Cogs::Core::RiserTensionerComponent::cylinderBaseRadius
float cylinderBaseRadius
Radius of the cylinder base.
Definition:
RiserTensionerComponent.h:27
Cogs::Core::RiserTensionerComponent::cylinderInnerRadius
float cylinderInnerRadius
Inner radius of the cylinder.
Definition:
RiserTensionerComponent.h:26
Cogs::Core::RiserTensionerComponent::cylinderLength
float cylinderLength
Length of the entire outer cylinder.
Definition:
RiserTensionerComponent.h:24
Cogs::Core::RiserTensionerComponent::rodMaterial
EntityPtr rodMaterial
Rod material.
Definition:
RiserTensionerComponent.h:35
Cogs::Core::RiserTensionerComponent::cylinderBaseLength
float cylinderBaseLength
Length of the cylinder base part (measured from the start of the cylinder).
Definition:
RiserTensionerComponent.h:28
Cogs::Core::RiserTensionerComponent::endDepth
float endDepth
End depth along trajectory.
Definition:
RiserTensionerComponent.h:38
Cogs::Core::RiserTensionerComponent::rodLength
float rodLength
Length of the rod.
Definition:
RiserTensionerComponent.h:32
Cogs::Core::RiserTensionerComponent::bottomOffset
glm::vec3 bottomOffset
Offset of bottom from trajectory position.
Definition:
RiserTensionerComponent.h:22
Cogs::StringView
Provides a weakly referenced view over the contents of a string.
Definition:
StringView.h:24
Cogs::Core::EntityPtr
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
Definition:
EntityPtr.h:12
Cogs
Contains all Cogs related functionality.
Definition:
FieldSetter.h:23
Generated by
1.9.6