Cogs.Core
Source
Systems
Data
TrajectorySystem.h
1
#pragma once
2
3
#include "Systems/ComponentSystem.h"
4
5
#include "Components/Data/TrajectoryComponent.h"
6
7
namespace
Cogs
8
{
9
namespace
Core
10
{
11
class
Context;
12
13
struct
TrajectoryData
14
{
15
std::vector<glm::quat>
frames
;
16
std::vector<bool>
lodSelection
;
17
std::vector<glm::vec4>
clipSpacePos
;
18
};
19
20
class
TrajectorySystem
:
public
ComponentSystemWithDataPool
<TrajectoryComponent, TrajectoryData>
21
{
22
public
:
23
TrajectorySystem
(
Memory::Allocator
* allocator,
SizeType
capacity) :
ComponentSystemWithDataPool
(allocator, capacity) {}
24
25
void
update
(
Context
*
context
);
26
27
private
:
28
static
void
generateAnchoredFramesOfReference(std::vector<glm::quat>& orientations,
29
const
std::vector<float>& indices,
30
const
std::vector<glm::vec3>& positions,
31
const
glm::vec3& startAnchor,
32
const
glm::vec3& stopAnchor,
33
const
float
anchorStickyness);
34
41
static
void
generateFramesOfReference
(std::vector<glm::quat>& orientations,
42
const
std::vector<glm::vec3>& positions);
43
};
44
}
45
}
Cogs::Core::ComponentSystemBase::context
Context * context
Pointer to the Context instance the system lives in.
Definition:
ComponentSystem.h:136
Cogs::Core::ComponentSystemBase::update
void update()
Updates the system state to that of the current frame.
Definition:
ComponentSystem.h:65
Cogs::Core::ComponentSystemWithDataPool
Component system with parallel data per component stored in a pool similar to how the components them...
Definition:
ComponentSystem.h:365
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::TrajectorySystem
Definition:
TrajectorySystem.h:21
Cogs::Core::TrajectorySystem::generateFramesOfReference
static void generateFramesOfReference(std::vector< glm::quat > &orientations, const std::vector< glm::vec3 > &positions)
Definition:
TrajectorySystem.cpp:293
Cogs::Memory::Allocator
Base allocator implementation.
Definition:
Allocator.h:30
Cogs
Contains all Cogs related functionality.
Definition:
FieldSetter.h:23
Cogs::SizeType
ComponentIndex SizeType
Type used to track the size of pools.
Definition:
Component.h:19
Cogs::Core::TrajectoryData
Definition:
TrajectorySystem.h:14
Cogs::Core::TrajectoryData::frames
std::vector< glm::quat > frames
Frames of reference along trajectory with minimal torsion.
Definition:
TrajectorySystem.h:15
Cogs::Core::TrajectoryData::clipSpacePos
std::vector< glm::vec4 > clipSpacePos
Clip space position of trajectory stations.
Definition:
TrajectorySystem.h:17
Cogs::Core::TrajectoryData::lodSelection
std::vector< bool > lodSelection
Set of trajectory stations that should be included in current lod-situation.
Definition:
TrajectorySystem.h:16
Generated by
1.9.6