Cogs.Core
Source
Systems
Core
Text3DSystem.h
1
#pragma once
2
3
#include "../ComponentSystem.h"
4
5
#include "../../Components/Core/Text3DComponent.h"
6
7
namespace
Cogs
{
8
namespace
Core {
9
class
Context;
10
class
FontManager;
11
15
class
Text3DSystem
:
public
ComponentSystem
<Text3DComponent>
16
{
17
public
:
18
Text3DSystem
(
Memory::Allocator
* allocator,
SizeType
capacity) :
ComponentSystem
(allocator, capacity) {}
19
20
virtual
void
update
(
Context
*
context
)
override
;
21
22
private
:
23
MaterialHandle
textMaterial;
24
25
static
float
calcTextWidth(
const
FontManager
* fontManager,
26
const
Font
& font,
27
const
std::string& text);
28
29
static
void
generateText(std::vector<glm::vec3>& vertices,
30
std::vector<glm::vec2>& uvs,
31
const
FontManager
* fontManager,
32
const
Font
& font,
33
const
std::string& text,
34
glm::vec3 position,
35
glm::vec3 hAxis,
36
glm::vec3 vAxis,
37
Alignment alignment);
38
};
39
}
40
}
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::ComponentSystem
Typed component system managing a pool of components with the given ComponentType.
Definition:
ComponentSystem.h:144
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::FontManager
Font manager responsible for loading, processing and lifetime of Font resources.
Definition:
FontManager.h:40
Cogs::Core::Text3DSystem
The 3D text system handles Text3DComponents.
Definition:
Text3DSystem.h:16
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::Font
Font resources are used to render text with a specific font and size.
Definition:
Font.h:22
Cogs::Core::ResourceHandle_t< Material >
Generated by
1.9.6