Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Game::SceneGenerator Class Reference

#include <scene_generator.h>

Public Member Functions

 SceneGenerator ()=delete
 
 ~SceneGenerator ()
 
 SceneGenerator (const Map &animation_index, std::shared_ptr< Graphics::TextureManager > texture_manager, std::shared_ptr< Graphics::ShaderManager > shader_manager, const unsigned int ui_z_slots)
 SceneGenerator constructor. More...
 
 SceneGenerator (const SceneGenerator &s)=default
 SceneGenerator copy constructor. More...
 
SceneGeneratoroperator= (const SceneGenerator &other)=default
 SceneGenerator equal operator. More...
 
std::shared_ptr< ScenecreateSceneFromMap (const unsigned int patch_width_tiles, const unsigned int patch_height_tiles, const Map &map)
 Creates a scene from a map. More...
 
std::shared_ptr< EntitygetDynamicEntityByName (const std::string &name)
 Gets a dynamic entity by name. More...
 
std::vector< std::string > getDynamicEntityNames () const noexcept
 Gets all dynamic entity names. More...
 
std::string getStrippedMapName (const std::string path)
 Strips path specification from map name. More...
 

Constructor & Destructor Documentation

Game::SceneGenerator::SceneGenerator ( )
delete
Game::SceneGenerator::~SceneGenerator ( )
Game::SceneGenerator::SceneGenerator ( const Map animation_index,
std::shared_ptr< Graphics::TextureManager texture_manager,
std::shared_ptr< Graphics::ShaderManager shader_manager,
const unsigned int  ui_z_slots 
)

SceneGenerator constructor.

Parameters
[in]animation_indexThe animation index containing all animations
[in]texture_managerThe texture manager
[in]shader_managerThe shader manager
Game::SceneGenerator::SceneGenerator ( const SceneGenerator s)
default

SceneGenerator copy constructor.

Parameters
[in]sThe other SceneGenerator

Member Function Documentation

std::shared_ptr< Scene > Game::SceneGenerator::createSceneFromMap ( const unsigned int  patch_width_tiles,
const unsigned int  patch_height_tiles,
const Map map 
)

Creates a scene from a map.

Parameters
[in]patch_width_tilesThe patch width in tiles
[in]patch_height_tilesThe patch height in tiles
[in]mapThe map
Returns
A newly created scene

References Game::Map::getImpl(), Game::Map::getPath(), and getStrippedMapName().

Referenced by generated::getSceneGeneratorModule().

std::shared_ptr< Entity > Game::SceneGenerator::getDynamicEntityByName ( const std::string &  name)

Gets a dynamic entity by name.

Parameters
[in]nameThe name
Returns
The dynamic entity by name.

Referenced by generated::getSceneGeneratorModule().

std::vector< std::string > Game::SceneGenerator::getDynamicEntityNames ( ) const
noexcept

Gets all dynamic entity names.

Returns
The dynamic entity names.

Referenced by generated::getSceneGeneratorModule().

std::string Game::SceneGenerator::getStrippedMapName ( const std::string  path)

Strips path specification from map name.

Parameters
[in]pathThe path
Returns
The stripped map name.

Referenced by createSceneFromMap(), and generated::getSceneGeneratorModule().

SceneGenerator& Game::SceneGenerator::operator= ( const SceneGenerator other)
default

SceneGenerator equal operator.

Parameters
[in]otherThe other SceneGenerator
Returns
*this

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