esp::scene::SceneGraph class

Public types

using DrawableGroups = std::unordered_map<std::string, gfx::DrawableGroup>

Public static functions

static auto isRootNode(SceneNode& node) -> bool

Constructors, destructors, conversion operators

SceneGraph()
~SceneGraph() virtual

Public functions

auto getRootNode() -> SceneNode&
auto getRootNode() const -> const SceneNode&
auto getDrawables(const std::string& groupName = {}) -> gfx::DrawableGroup&
auto getDrawables(const std::string& groupName = {}) const -> const gfx::DrawableGroup&
auto getDrawableGroups() -> DrawableGroups&
Get all drawable groups in this SceneGraph.
auto getDrawableGroups() const -> const DrawableGroups&
auto getDrawableGroup(const std::string& id) -> gfx::DrawableGroup*
Get a DrawableGroup by ID.
auto getDrawableGroup(const std::string& id) const -> const gfx::DrawableGroup*
template<typename... DrawableGroupArgs>
auto createDrawableGroup(const std::string& id, DrawableGroupArgs && ... args) -> gfx::DrawableGroup*
Creates a DrawableGroup.
auto deleteDrawableGroup(const std::string& id) -> bool
Deletes a DrawableGroup by ID.

Protected variables

MagnumScene world_
SceneNode rootNode_
DrawableGroups drawableGroups_

Function documentation

const DrawableGroups& esp::scene::SceneGraph::getDrawableGroups() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

gfx::DrawableGroup* esp::scene::SceneGraph::getDrawableGroup(const std::string& id)

Get a DrawableGroup by ID.

Returns Pointer to DrawableGroup, or nullptr if shader does not exist.

DrawableGroup pointer is only valid until group is deleted!

const gfx::DrawableGroup* esp::scene::SceneGraph::getDrawableGroup(const std::string& id) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename... DrawableGroupArgs>
gfx::DrawableGroup* esp::scene::SceneGraph::createDrawableGroup(const std::string& id, DrawableGroupArgs && ... args)

Creates a DrawableGroup.

Parameters
id ID of created DrawableGroup
args Arguments passed to DrawableGroup constructor
Returns Pointer to the created DrawableGroup, or nullptr if a DrawableGroup with the same ID already exists.

bool esp::scene::SceneGraph::deleteDrawableGroup(const std::string& id)

Deletes a DrawableGroup by ID.

Returns If the DrawableGroup with specified ID existed.