Cogs.Core
HighlightRegionComponent.h
1#pragma once
2
3#include "Components/Core/RenderComponent.h"
4
5#include <glm/vec3.hpp>
6#include <glm/gtc/quaternion.hpp>
7
8namespace Cogs::Core {
9
12 {
13 public:
14 static void registerType();
15
16 std::vector<glm::quat> rotation;
17 std::vector<glm::vec3> position;
18 std::vector<glm::vec3> scale;
19 std::vector<glm::vec4> color;
20 std::vector<uint32_t> id;
21
22 float alpha = 1.f;
23 float depthSlopedFactor = 0.f;
24 float depthConstantBias = 0.f;
25
26 bool debugForceVisible = false;
27 bool debugForceNoSplit = false;
28 bool debugShowTriangles = false;
30 };
31
32}
33
34template<> inline Cogs::StringView getName<Cogs::Core::HighlightRegionComponent>() { return "HighlightRegionComponent"; }
bool debugForceNoSplit
Disable use of cube splitting to handle near-plane clipping.
std::vector< glm::vec3 > position
Instance positions.
float depthConstantBias
Pull highlight frontface slightly towards the camera with a constant.
bool debugForceVisible
Debug option to force region to be visible regardles contents in the region, to help tracking down mi...
std::vector< glm::vec4 > color
Instance colors, alpha gives effect intenisty.
float depthSlopedFactor
Pull highlight frontface slightly towards the camera based on surface slope.
bool debugDiscardBehindNearNotEye
Debug option to change plane which triggers region discard.
bool debugShowTriangles
Debug option to give triangles different colors.
std::vector< glm::vec3 > scale
Instance scale factors.
std::vector< uint32_t > id
Instance ids.
std::vector< glm::quat > rotation
Instance rotations.
float alpha
Overall alpha multiplied with the per instance alpha to give effective alpha.
Base component for all rendering content.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....