Cogs.Core
AnnotationAxisSystem.h
1#pragma once
2
3#include "Systems/ComponentSystem.h"
4
5#include "../Components/AnnotationAxisComponent.h"
6
7#include "Resources/Resources.h"
8
9namespace Cogs
10{
11 namespace Core
12 {
13 class Context;
14
15 class AnnotationAxisSystem : public ComponentSystem<AnnotationAxisComponent>
16 {
17 public:
18 AnnotationAxisSystem(Memory::Allocator * allocator, SizeType capacity) : ComponentSystem(allocator, capacity) {}
20
21 void update(Context * context);
22
23 void addAnnotations(const int level,
24 std::vector<int> & indexes,
25 const glm::mat4 & projectionMatrix,
26 const glm::vec2 & viewportSize,
27 const float gap,
28 const glm::vec3 * positions, int startIndex, int endIndex);
29
30 float getScreenSpaceDistance(const glm::vec3 & p1, const glm::vec3 & p2, const glm::vec2 & viewportSize) const;
31 };
32 }
33}
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
Typed component system managing a pool of components with the given ComponentType.
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Base allocator implementation.
Definition: Allocator.h:30
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
ComponentIndex SizeType
Type used to track the size of pools.
Definition: Component.h:19