Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Grid.hpp
Go to the documentation of this file.
1#pragma once
2#include <glm/glm.hpp>
3
8// [ReflectClass]
9struct 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
38REGISTER_COMPONENT(Grid, "Rendering & Lights/Grid");
39
#define REGISTER_COMPONENT(Type, MenuPath)
Definition ComponentReflection.hpp:156
Represents a grid component used for rendering a grid overlay.
Definition Grid.hpp:9
uint32_t meshID
Definition Grid.hpp:14
float size
Definition Grid.hpp:19
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
glm::vec4 color
Definition Grid.hpp:21
uint32_t colorID
Definition Grid.hpp:12
float spacing
Definition Grid.hpp:17