Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Static Public Member Functions | List of all members
blowbox::EntityFactory Class Reference

#include <entity_factory.h>

Static Public Member Functions

static SharedPtr< EntityCreateEntity (const String &name)
 
static SharedPtr< EntityCreateEntity (const String &name, SharedPtr< Entity > parent)
 
static void AddChildToEntity (SharedPtr< Entity > entity, SharedPtr< Entity > child)
 
static void RemoveChildFromEntity (SharedPtr< Entity > entity, SharedPtr< Entity > child)
 

Detailed Description

Factory for creating Entity instances and managing Entity children.

A Factory pattern for creating Entity instances and creating parental links between entities.

Member Function Documentation

void blowbox::EntityFactory::AddChildToEntity ( SharedPtr< Entity entity,
SharedPtr< Entity child 
)
static

Adds a child to an Entity.

Parameters
[in]entityThe entity to which you want to add a child
[in]childThe child you want to add to the entity
SharedPtr< Entity > blowbox::EntityFactory::CreateEntity ( const String name)
static

Creates a parentless Entity instance.

Parameters
[in]nameThe name of the new Entity.
SharedPtr< Entity > blowbox::EntityFactory::CreateEntity ( const String name,
SharedPtr< Entity parent 
)
static

Creates an Entity instance with a parent.

Parameters
[in]nameThe name of the new Entity.
[in]parentThe parent of the new Entity.
void blowbox::EntityFactory::RemoveChildFromEntity ( SharedPtr< Entity entity,
SharedPtr< Entity child 
)
static

Remove a child from an Entity.

Parameters
[in]entityThe entity from which you want to remove a child
[in]childThe child you want to remove from the entity

The documentation for this class was generated from the following files: