Cogs.Core
EntityCreator.h
1#pragma once
2
3#include "Base.h"
4
5#include "Context.h"
6
7#include "Resources/AssetDefinition.h"
8
9namespace Cogs::Core
10{
11 enum class EntityParentMode
12 {
13 None = 0,
14 Default,
15 TransformOnly
16 };
17
19 {
20 Context * context;
21 ComponentModel::Entity * parent = nullptr;
22 SceneDefinition * scene;
23 EntityParentMode parentMode = EntityParentMode::None;
24 bool skipModel = false;
25 };
26
27 COGSCORE_DLL_API EntityPtr createEntity(EntityCreationContext & entityContext, const SceneEntityDefinition & definition);
28
29 COGSCORE_DLL_API ComponentModel::Entity * createEntity(Context * context, SceneDefinition & scene, const SceneEntityDefinition & definition, Cogs::ComponentModel::Entity * parent = nullptr);
30}
Container for components, providing composition of dynamic entities.
Definition: Entity.h:18
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
Definition: EntityPtr.h:12