Cogs.Core
BadgeSetComponent.cpp
1#include "BadgeSetComponent.h"
2
3#include "Types.h"
4using namespace Cogs::Reflection;
5
7{
8 Field fields[] = {
17 Field(Name("nearScalingCutoff"), &BadgeSetComponent::nearScalingCutoff),
18 Field(Name("farScalingCutoff"), &BadgeSetComponent::farScalingCutoff),
19 Field(Name("nearVisibilityLimit"), &BadgeSetComponent::nearVisibilityLimit),
20 Field(Name("farVisibilityLimit"), &BadgeSetComponent::farVisibilityLimit),
21 Field(Name("outputAlphaValue"), &BadgeSetComponent::outputAlphaValue),
23 Field(Name("boundingBoxLower"), &BadgeSetComponent::boundingBoxLower),
25 };
26 TypeDatabase::createType<BadgeSetComponent>().setBase<Component>().setFields(fields);
27}
Field definition describing a single data member of a data structure.
Definition: Field.h:70
Contains reflection support.
Definition: Component.h:11
float nearScalingCutoff
Determines the near limit where the badge stops scaling freely.
float farScalingCutoff
Determines the far limit where the badge stops scaling freely.
std::vector< glm::vec3 > positions
Badge positions.
TextureHandle iconTexture
Texture array (ktx2) containing icons.
TextureHandle digitTexture
Texture array (ktx2) containing all valid numeric icons.
float farVisibilityLimit
Don't display badges further than this distance from the camera.
glm::vec2 boundingBoxLower
Position of the lower corner of the bounding box.
std::vector< int > numbers
The number to display on the badge.
float outputAlphaValue
Output alpha value for the fragments not discarded by the shader.
float nearVisibilityLimit
Don't display badges closer than this distance from the camera.
float badgeSize
Size of the badge.
std::vector< int > icons
Icon (index) to be rendered on top of style.
TextureHandle styleTexture
Texture array (ktx2) containing background styling.
static void registerType()
Register the type in the type system.
std::vector< int > styles
Style (index) used for background behind icon.
glm::vec2 boundingBoxUpper
Position of the upper corner of the bounding box.
glm::vec2 anchorPoint
The location where the badge is anchored.
Represents an unique name.
Definition: Name.h:70