Cogs.Core
SpriteRenderComponent.h
1#pragma once
2
3#include "RenderComponent.h"
4
5namespace Cogs
6{
7 namespace Core
8 {
12 enum struct SizeMode
13 {
19 Relative = 0,
25 Pixels = 1,
26 };
27
31 enum struct PositionMode
32 {
37 Relative = 0,
42 Pixels = 1,
49 World = 2,
50 /*
51 Position given in world space coordinates.
52
53 Any positional offset is applied in the local coordinate system, and therefore transformed
54 by the
55 */
56 Local = 3,
57 };
58
60 {
61 public:
62 static void registerType();
63 };
64 }
65}
66
67template<> inline Cogs::StringView getName<Cogs::Core::SpriteRenderComponent>() { return "SpriteRenderComponent"; }
68template<> inline Cogs::StringView getName<Cogs::Core::SizeMode>() { return "SizeMode"; }
69template<> inline Cogs::StringView getName<Cogs::Core::PositionMode>() { return "PositionMode"; }
Base component for all rendering content.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
PositionMode
Positioning mode.
@ World
Position given in world space coordinates.
SizeMode
Sizing mode.
@ Relative
Size given in normalized device coordinates.
@ Pixels
Size given in screen pixels.
Contains all Cogs related functionality.
Definition: FieldSetter.h:23