1#include "EntityDefinitions.h"
2#include "EntityDefinition.h"
4#include "EntityStore.h"
6#include "Serialization/EntityReader.h"
10 readEntityDefinition(R
"(
16 "MeshRenderComponent",
21 readEntityDefinition(R"(
22{ "name": "SphereMesh",
26 "MeshGeneratorComponent",
29 "MeshRenderComponent" ],
31 { "MeshGeneratorComponent": { "shape": "SphereGeoTexSph" }},
32 { "LodComponent": { "policy": "None" }} ]
36 readEntityDefinition(R"(
37{ "name": "MarkerPointSet",
41 "MarkerPointSetComponent",
43 "InstancedMeshRenderComponent"
47 readEntityDefinition(R"(
48{ "name": "OceanRectangle",
50 "AdaptivePlanarGridComponent",
51 "BasicOceanComponent",
57 { "LodComponent": { "policy": "GeometricTolerance", "geometricTolerance": 20.0 }},
58 { "SceneComponent" : { "pickable": false } },
63 readEntityDefinition(R"(
64{ "name": "BasicTerrain",
66 "AdaptivePlanarGridComponent",
67 "BasicTerrainComponent",
71 "MeshRenderComponent",
75 { "LodComponent": { "policy": "GeometricTolerance", "geometricTolerance": 20.0 }},
76 { "SceneComponent" : { "pickable": false } },
81 readEntityDefinition(R"(
89 "MeshRenderComponent",
90 "MaterialComponent" ],
94 readEntityDefinition(R"(
96 "name": "MeshPartWithMaterial",
101 "MeshRenderComponent",
102 "MaterialComponent" ],
106 readEntityDefinition(R"(
110 "TransformComponent",
113 "MeshRenderComponent",
114 "ExtrusionComponent",
115 "MaterialComponent" ],
119 readEntityDefinition(R"(
123 "TransformComponent",
126 "MeshRenderComponent",
127 "ExtrusionComponent",
128 "MaterialComponent" ],
132 readEntityDefinition(R"(
134 "name": "ExtrudeShape",
136 "TransformComponent",
139 "MeshRenderComponent",
140 "ExtrusionComponent",
141 "MaterialComponent" ],
145 readEntityDefinition(R"(
147 "name": "Trajectory",
150 "TransformComponent",
152 "TrajectoryComponent" ],
156 readEntityDefinition(R"(
158 "name": "TrajectoryLayout",
160 "TransformComponent",
162 "TrajectoryLayoutComponent" ],
166 readEntityDefinition(R"(
168 "name": "ReflectionCamera",
170 "TransformComponent",
173 "ReflectionComponent" ],
177 readEntityDefinition(R"(
179 "name": "CogsMaterial",
180 "description": "Entity with only MaterialComponent. Can be used to supply master material, e.g. MaterialComponent.material",
182 "MaterialComponent" ],
186 readEntityDefinition(R"(
188 "name": "TextureGeneratorMaterial",
190 "TextureGeneratorComponent",
191 "MaterialComponent" ],
195 readEntityDefinition(R"(
199 "TransformComponent",
204 "MeshRenderComponent" ],
206 { "ShapeComponent": { "primitiveType": "PointList" } },
211 readEntityDefinition(R"(
215 "TransformComponent",
218 "TrajectoryAlignedComponent",
219 "MaterialComponent" ],
223 readEntityDefinition(R"(
227 "DataSetComponent" ],
231 readEntityDefinition(R"(
233 "name": "LookupColorMap",
234 "description": "Colormap Entity. Store colormap as texture in MaterialComponent. Sample usage: HeightMapComponent.colorMap, ZipComponent.colorMap",
236 "MaterialComponent" ],
240 readEntityDefinition(R"(
242 "name": "SingleColorMap",
244 "MaterialComponent" ],
248 readEntityDefinition(R"(
250 "name": "VariableExtrusionShape",
252 "TransformComponent",
255 "MeshRenderComponent",
256 "VariableExtrusionComponent",
257 "MaterialComponent" ],
266 definition.
name = name;
Stores top level entities for the engine.
void addEntityDefinition(const EntityDefinition &definition)
Add the given entity definition to the store.
void COGSCORE_DLL_API createDefaultEntityDefinitions(class EntityStore *entityStore)
Create the default entity definitions supported by Cogs.
void COGSCORE_DLL_API createEntityDefinition(const std::string &name, std::vector< std::string > components, class EntityStore *entityStore)
Create a simple entity definition with the given name and list of components.
Defines how to construct entities of a certain type by a list of components to instantiate and defaul...
std::vector< std::string > components
Names of the component types to instantiate when creating an entity from this definition.