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"(
83 "name": "MeshPartWithMaterial",
88 "MeshRenderComponent",
89 "MaterialComponent" ],
93 readEntityDefinition(R"(
100 "MeshRenderComponent",
101 "ExtrusionComponent",
102 "MaterialComponent" ],
106 readEntityDefinition(R"(
110 "TransformComponent",
113 "MeshRenderComponent",
114 "ExtrusionComponent",
115 "MaterialComponent" ],
119 readEntityDefinition(R"(
121 "name": "ExtrudeShape",
123 "TransformComponent",
126 "MeshRenderComponent",
127 "ExtrusionComponent",
128 "MaterialComponent" ],
132 readEntityDefinition(R"(
134 "name": "Trajectory",
137 "TransformComponent",
139 "TrajectoryComponent" ],
143 readEntityDefinition(R"(
145 "name": "TrajectoryLayout",
147 "TransformComponent",
149 "TrajectoryLayoutComponent" ],
153 readEntityDefinition(R"(
155 "name": "ReflectionCamera",
157 "TransformComponent",
160 "ReflectionComponent" ],
164 readEntityDefinition(R"(
166 "name": "CogsMaterial",
167 "description": "Entity with only MaterialComponent. Can be used to supply master material, e.g. MaterialComponent.material",
169 "MaterialComponent" ],
173 readEntityDefinition(R"(
175 "name": "TextureGeneratorMaterial",
177 "TextureGeneratorComponent",
178 "MaterialComponent" ],
182 readEntityDefinition(R"(
186 "TransformComponent",
191 "MeshRenderComponent" ],
193 { "ShapeComponent": { "primitiveType": "PointList" } },
198 readEntityDefinition(R"(
202 "TransformComponent",
205 "TrajectoryAlignedComponent",
206 "MaterialComponent" ],
210 readEntityDefinition(R"(
214 "DataSetComponent" ],
218 readEntityDefinition(R"(
220 "name": "LookupColorMap",
221 "description": "Colormap Entity. Store colormap as texture in MaterialComponent. Sample usage: HeightMapComponent.colorMap, ZipComponent.colorMap",
223 "MaterialComponent" ],
227 readEntityDefinition(R"(
229 "name": "SingleColorMap",
231 "MaterialComponent" ],
235 readEntityDefinition(R"(
237 "name": "VariableExtrusionShape",
239 "TransformComponent",
242 "MeshRenderComponent",
243 "VariableExtrusionComponent",
244 "MaterialComponent" ],
253 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.