Cogs.Core
BillboardComponent.cpp
1#include "BillboardComponent.h"
2
3#include "Types.h"
4
5using namespace Cogs::Reflection;
6
8{
9 Field fields[] = {
15 Field(Name("horizontalAlignment"), &BillboardComponent::horizontalAlignment),
16 Field(Name("verticalAlignment"), &BillboardComponent::verticalAlignment),
19 };
20
21 TypeDatabase::createType<BillboardComponent>().setBase<Component>().setFields(fields);
22}
glm::vec2 imageSize
Size of the billboard in pixels.
static void registerType()
Register the type in the type system.
VerticalAlignment verticalAlignment
Vertical alignment of the billboard.
HorizontalAlignment horizontalAlignment
Horizontal alignment of the billboard.
bool flipY
Flip the billboard vertically.
TextureHandle image
Image to show.
glm::vec4 color
Color tint of the billboard.
bool flipX
Flip the billboard horizontally.
bool alwaysOnTop
Render billboard on top of normal geometry.
Field definition describing a single data member of a data structure.
Definition: Field.h:68
Contains reflection support.
Definition: Component.h:11
Represents an unique name.
Definition: Name.h:70