Cogs.Core
ClipShapeComponent.cpp
1#include "ClipShapeComponent.h"
2
3#include "Types.h"
4
5using namespace Cogs::Reflection;
6
7void Cogs::Core::ClipShapeComponent::registerType()
8{
9 static constexpr EnumeratorDef enums[] = {
10 { "None", ClipShapeType::None },
11 { "Cube", ClipShapeType::Cube },
12 { "InvertedCube", ClipShapeType::InvertedCube },
13 };
14 TypeDatabase::createType<ClipShapeType>().setEnumerators(enums);
15
16 Field fields[] = {
20 };
21 TypeDatabase::createType<ClipShapeComponent>().setBase<Component>().setFields(fields);
22}
23
24void Cogs::Core::ClipShapeRefComponent::registerType()
25{
26 Field fields[] = {
28 };
29 TypeDatabase::createType<ClipShapeRefComponent>().setBase<Component>().setFields(fields);
30}
glm::vec3 max
The high-end corner of cube-shapes.
ClipShapeType shape
The basic shape of the clip region.
glm::vec3 min
The low-end corner of cube-shapes.
WeakEntityPtr clipShape
Reference to the clip shape that should clip this entity.
Field definition describing a single data member of a data structure.
Definition: Field.h:68
@ InvertedCube
Clip the inside of a cube.
@ None
No clipping at all.
@ Cube
Clip the outside of a cube,.
Contains reflection support.
Definition: Component.h:11