Rubeus::RWorld class

The container for all gameobjects. Synonymous to Scene graph.

Constructors, destructors, conversion operators

RWorld()
Constructor.
RWorld(std::vector<RGameObject*>& gameObjects)
Constructor.
~RWorld()
Destructor.

Public functions

void tick()
Call tick functions of all objects in the world once.
void add(RGameObject& gameObject)
Add a gameobject to the world.
void add(const std::vector<RGameObject*>& gameObjects)
Add an array of gameobjects to the world.
void setObjectArray(std::vector<RGameObject*>& gameObjects)
Set the array of gameObjects in use.
auto getActiveObjects() const -> std::vector<RGameObject*>&
Returns the array of gameObjects in use.

Function documentation

Rubeus::RWorld::RWorld(std::vector<RGameObject*>& gameObjects)

Constructor.

Parameters
gameObjects An array of gameObjects.

void Rubeus::RWorld::add(RGameObject& gameObject)

Add a gameobject to the world.

Parameters
gameObject The gameobject to be added.

void Rubeus::RWorld::add(const std::vector<RGameObject*>& gameObjects)

Add an array of gameobjects to the world.

Parameters
gameObjects The gameobjects to be added.

void Rubeus::RWorld::setObjectArray(std::vector<RGameObject*>& gameObjects)

Set the array of gameObjects in use.

Parameters
gameObjects Array of gameObjects in use.

std::vector<RGameObject*>& Rubeus::RWorld::getActiveObjects() const

Returns the array of gameObjects in use.

Returns The gameObject array in use