Hymn to Beauty
C++ 3D Engine
ActiveHymn Class Reference

A hymn to beauty. More...

#include <Hymn.hpp>

Public Member Functions

void Clear ()
 Clear the hymn of all properties. More...
 
const std::string & GetPath () const
 Get the path where the hymn is saved. More...
 
void SetPath (const std::string &path)
 Set the path where the hymn is saved. More...
 
std::string GetSavePath () const
 Gets the path to the hymn file. More...
 
void Save () const
 Save the hymn. More...
 
void Load (const std::string &path)
 Load a hymn. More...
 
Json::Value ToJson () const
 Convert the hymn to Json. More...
 
void FromJson (Json::Value root)
 Convert a Json to a Hymn. More...
 
void Update (float deltaTime)
 Update the world. More...
 
void Render (const RenderManager::DebugConfiguration &debugConfiguration, Entity *camera=nullptr)
 Render the world. More...
 

Static Public Member Functions

static EntityGetEntityByGUID (unsigned int GUID)
 Find entity via GUID. More...
 

Public Attributes

std::string startupScene
 Scene to start when playing the hymn. More...
 
World world
 The game world. More...
 
unsigned int entityNumber = 1U
 The id of the next entity to create. More...
 
std::vector< ScriptFile * > scripts
 Scripts. More...
 
unsigned int scriptNumber = 0U
 The id of the next script to create. More...
 
bool restart = false
 Whether to restart the hymn. More...
 
Json::Value saveStateWorld
 Recently saved state of the world. More...
 
Json::Value saveStateHymn
 Recently saved state of the hymn. More...
 
std::string name
 The name of the hymn. More...
 

Friends

ActiveHymnHymn ()
 Get the active hymn. More...
 

Detailed Description

A hymn to beauty.

Member Function Documentation

◆ Clear()

void ActiveHymn::Clear ( )

Clear the hymn of all properties.

◆ FromJson()

void ActiveHymn::FromJson ( Json::Value  root)

Convert a Json to a Hymn.

Parameters
rootThe Json file to load.

◆ GetEntityByGUID()

Entity * ActiveHymn::GetEntityByGUID ( unsigned int  GUID)
static

Find entity via GUID.

Parameters
GUIDThe Unique Identifier for what entity you want to find.
Returns
Entity found or nullptr if entity with this param does not exist.

◆ GetPath()

const string & ActiveHymn::GetPath ( ) const

Get the path where the hymn is saved.

Returns
The hymn's path.

◆ GetSavePath()

std::string ActiveHymn::GetSavePath ( ) const

Gets the path to the hymn file.

Returns
The full path.

◆ Load()

void ActiveHymn::Load ( const std::string &  path)

Load a hymn.

Parameters
pathPath to the saved hymn.

◆ Render()

void ActiveHymn::Render ( const RenderManager::DebugConfiguration debugConfiguration,
Entity camera = nullptr 
)

Render the world.

Parameters
debugConfigurationConfiguration for visualizing debug information.
cameraCamera through which to render (or first camera in the world if nullptr).

◆ Save()

void ActiveHymn::Save ( ) const

Save the hymn.

◆ SetPath()

void ActiveHymn::SetPath ( const std::string &  path)

Set the path where the hymn is saved.

Parameters
pathNew path.

◆ ToJson()

Json::Value ActiveHymn::ToJson ( ) const

Convert the hymn to Json.

Returns
The hymn as a Json.

◆ Update()

void ActiveHymn::Update ( float  deltaTime)

Update the world.

Parameters
deltaTimeTime since last frame (in seconds).

Friends And Related Function Documentation

◆ Hymn

ActiveHymn & Hymn ( )
friend

Get the active hymn.

Returns
The ActiveHymn instance.

Member Data Documentation

◆ entityNumber

unsigned int ActiveHymn::entityNumber = 1U

The id of the next entity to create.

◆ name

std::string ActiveHymn::name

The name of the hymn.

◆ restart

bool ActiveHymn::restart = false

Whether to restart the hymn.

◆ saveStateHymn

Json::Value ActiveHymn::saveStateHymn

Recently saved state of the hymn.

◆ saveStateWorld

Json::Value ActiveHymn::saveStateWorld

Recently saved state of the world.

◆ scriptNumber

unsigned int ActiveHymn::scriptNumber = 0U

The id of the next script to create.

◆ scripts

std::vector<ScriptFile*> ActiveHymn::scripts

Scripts.

◆ startupScene

std::string ActiveHymn::startupScene

Scene to start when playing the hymn.

◆ world

World ActiveHymn::world

The game world.


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