3#include "../../Flags.h"
4#include "Resources/Resources.h"
6#include "Foundation/ComponentModel/Component.h"
15 class TransformComponent;
17 enum class Alignment : uint32_t {
27 TopCenter = Center | Top,
28 TopRight = Right | Top,
30 MiddleLeft = Left | Middle,
31 MiddleCenter = Center | Middle,
32 MiddleRight = Right | Middle,
34 BottomLeft = Left | Bottom,
35 BottomCenter = Center | Bottom,
36 BottomRight = Right | Bottom,
44 ENABLE_ENUM_FLAGS(Alignment);
126template<>
inline Cogs::StringView getName<Cogs::Core::Alignment>() {
return "Alignment"; }
127template<>
inline Cogs::StringView getName<std::vector<Cogs::Core::Alignment>>() {
return "vector<Alignment>"; }
128template<>
inline Cogs::StringView getName<Cogs::Core::Text3DComponent>() {
return "Text3DComponent"; }
Base class for Component instances.
Renders the given text(s) as 3D mesh data.
std::vector< glm::vec3 > hAxes
Horizontal axes along which the text will be orientated.
FontHandle fontHandle
Handle to the font resource to use when rendering text.
std::vector< glm::vec3 > vAxes
Vertical axes which, with the horizonal axes, defines the plane in which the text will be placed.
glm::vec4 defaultColor
Single color value to apply to all text strings.
Alignment defaultAlignment
Single alignment to apply to all text strings.
bool isValid() const
Determine whether this component is valid enough to be processed by the Text3DSystem.
std::vector< Alignment > alignments
Alignment settings for each text string.
std::vector< glm::vec4 > colors
Colors for individual strings in text.
static void registerType()
Register the type in the type system.
std::vector< glm::vec3 > positions
Offset positions for each of the strings in texts.
std::vector< std::string > texts
A set of text strings to render.
Provides a weakly referenced view over the contents of a string.
Contains all Cogs related functionality.
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.