Crimson Engine
1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Toggle main menu visibility
Loading...
Searching...
No Matches
Grid.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <glm/glm.hpp>
3
8
// [ReflectClass]
9
struct
Grid
{
10
11
// [ReflectField]
12
uint32_t
colorID
;
13
// [ReflectField]
14
uint32_t
meshID
;
15
16
// [ReflectField]
17
float
spacing
= 1.0f;
// Distance between lines
18
// [ReflectField]
19
float
size
= 100.0f;
// Render area around the camera
20
// [ReflectField]
21
glm::vec4
color
= { 0.5f, 0.5f, 0.5f, 1.0f };
22
23
24
25
32
Grid
(
float
s = 1.f,
float
sz = 100.f, glm::vec4 c = { 0.5f,0.5f,0.5f,1.f })
33
:
spacing
(s),
size
(sz),
color
(c) {
34
}
35
};
36
37
#include "
meta/ComponentReflection.hpp
"
38
REGISTER_COMPONENT
(
Grid
,
"Rendering & Lights/Grid"
);
39
ComponentReflection.hpp
REGISTER_COMPONENT
#define REGISTER_COMPONENT(Type, MenuPath)
Definition
ComponentReflection.hpp:156
Grid
Represents a grid component used for rendering a grid overlay.
Definition
Grid.hpp:9
Grid::meshID
uint32_t meshID
Definition
Grid.hpp:14
Grid::size
float size
Definition
Grid.hpp:19
Grid::Grid
Grid(float s=1.f, float sz=100.f, glm::vec4 c={ 0.5f, 0.5f, 0.5f, 1.f })
Construct a new Grid object.
Definition
Grid.hpp:32
Grid::color
glm::vec4 color
Definition
Grid.hpp:21
Grid::colorID
uint32_t colorID
Definition
Grid.hpp:12
Grid::spacing
float spacing
Definition
Grid.hpp:17
engine
include
ecs
components
Grid.hpp
Generated by
1.17.0