Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
entity_factory.h
1 #pragma once
2 
3 #include "util/shared_ptr.h"
4 #include "util/string.h"
5 
6 namespace blowbox
7 {
8  class Entity;
9 
17  {
18  public:
23  static SharedPtr<Entity> CreateEntity(const String& name);
24 
30  static SharedPtr<Entity> CreateEntity(const String& name, SharedPtr<Entity> parent);
31 
37  static void AddChildToEntity(SharedPtr<Entity> entity, SharedPtr<Entity> child);
38 
45  };
46 }
static void AddChildToEntity(SharedPtr< Entity > entity, SharedPtr< Entity > child)
Adds a child to an Entity.
Definition: entity_factory.cc:25
Factory for creating Entity instances and managing Entity children.
Definition: entity_factory.h:16
static void RemoveChildFromEntity(SharedPtr< Entity > entity, SharedPtr< Entity > child)
Remove a child from an Entity.
Definition: entity_factory.cc:42
eastl::string String
Typedef for wrapping the EASTL string.
Definition: string.h:13
The main Blowbox namespace.
Definition: image.cc:8
eastl::shared_ptr< T > SharedPtr
Typedef for wrapping the EASTL shared_ptr.
Definition: shared_ptr.h:14
static SharedPtr< Entity > CreateEntity(const String &name)
Creates a parentless Entity instance.
Definition: entity_factory.cc:10