Cogs.Core
InstancedMeshBuilderComponent.h
1#pragma once
2
3#include "Foundation/ComponentModel/Entity.h"
4
5namespace Cogs::Core {
6
12 {
13 public:
14
16 std::vector<glm::vec3> positions;
17
19 std::vector<glm::quat> rotations;
20
22 std::vector<glm::vec3> scales;
23
25 std::vector<glm::vec4> colors;
26
29
31 bool fixedSize = false;
32
33 static void registerType();
34 };
35}
36
37template<> inline Cogs::StringView getName<Cogs::Core::InstancedMeshBuilderComponent>() { return "InstancedMeshBuilderComponent"; }
Base class for Component instances.
Definition: Component.h:143
float fixedSizeMaxDistance
Culling camera-distance when fixedSize is enabled. Disable by setting it to zero or negative value.
bool fixedSize
If set, instances are dynamically scaled s.t. they appear fixed sized on screen regardles of distance...
std::vector< glm::vec3 > scales
Per-instance scale factors, either empty or size matching the other array attributes.
std::vector< glm::quat > rotations
Per-instance rotations, either empty or size matching the other array attributes.
std::vector< glm::vec4 > colors
Per-instance colors, either empty or size matching the other array attributes.
std::vector< glm::vec3 > positions
Per-instance positions, either empty or size matching the other array attributes.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:50
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....