Rubeus::GraphicComponents::RGroup class

A group of objects in a family based hierarchy.

Base classes

class Rubeus::GraphicComponents::RRenderableObject
A renderable object. Allows specifying the position, size and color of the renderable object.
class Rubeus::RGameObject
A game object. Main class responsible for player interactions.

Constructors, destructors, conversion operators

RGroup(const RML::Matrix4& transform)
Constructor.
~RGroup()
Destructor.

Public functions

void submit(RRendererComponent& renderer) const override
Submit the group to a renderer queue.
auto add(RSprite* renderable) -> RGroup&
Adds a renderable object as the children of this object.
auto add(RGameObject* gameObject) -> RGroup&
Adds a game object as the children of this object.

Public variables

std::vector<RGameObject*> m_Children
Vector array of child objects.

Function documentation

Rubeus::GraphicComponents::RGroup::RGroup(const RML::Matrix4& transform)

Constructor.

Parameters
transform The tranformation matrix that displaces the childs of this group.

void Rubeus::GraphicComponents::RGroup::submit(RRendererComponent& renderer) const override

Submit the group to a renderer queue.

Parameters
renderer The renderer to send the group contents to.

RGroup& Rubeus::GraphicComponents::RGroup::add(RSprite* renderable)

Adds a renderable object as the children of this object.

Parameters
renderable The renderable object.
Returns Reference to this group object. Allows chaining add() calls. E.g. group.add(r1).add(r2);

RGroup& Rubeus::GraphicComponents::RGroup::add(RGameObject* gameObject)

Adds a game object as the children of this object.

Parameters
gameObject The game object to be added to this group.
Returns Reference to this group object. Allows chaining add() calls. E.g. group.add(r1).add(r2);