public |
Inheritance Graph
graph BT
SceneManager
SceneManager --> AttributeProvider
click SceneManager "classMinSG_1_1SceneManagement_1_1SceneManager"
click AttributeProvider "classUtil_1_1AttributeProvider"
Description
Manages registered Nodes, loads/saves Scene-descriptions from/to a file and handles scene-wide synchronization.
[ SceneManager ]
Main
SceneManager() | |
~SceneManager() |
Node Registration
void | registerNode(const Util::StringIdentifier & id, Util::Reference < Node > node) |
void | registerNode( Util::Reference < Node > node) If the [Node](classMinSG_1_1Node) is not registered, register the node with a new random id. |
void | registerGeometryNodes( Node * rootNode) Traverse the given subtree and register all GeometryNodes which are not registered. |
void | unregisterNode(const Util::StringIdentifier & id) Remove the association of a Node with the given id . |
std::string | getNameOfRegisteredNode( Node * node) const Return the registered id of the given [Node](classMinSG_1_1Node) . The result is empty if the node is not registered. |
Util::StringIdentifier | getNameIdOfRegisteredNode( Node * node) const |
Util::StringIdentifier | getNodeId( Node * node) const |
Node * | getRegisteredNode(const Util::StringIdentifier & id) const Return the Node associated with the given id or nullptr, if ther is no node with that id. |
void | getNamesOfRegisteredNodes(std::vector< std::string > & ids) const |
std::vector< Util::StringIdentifier > | getNodeIds() const |
bool | isNodeRegistered( Node * node) const |
Node * | createInstance(const Util::StringIdentifier & id) const |
Registered States
void | registerState(const Util::StringIdentifier & id, Util::Reference < State > state) |
void | registerState( Util::Reference < State > state) |
void | unregisterState(const Util::StringIdentifier & id) |
std::string | getNameOfRegisteredState( State * state) const |
Util::StringIdentifier | getStateId( State * state) const |
State * | getRegisteredState(const Util::StringIdentifier & id) const |
std::vector< Util::StringIdentifier > | getStateIds() const |
void | getNamesOfRegisteredStates(std::vector< std::string > & ids) const |
Behaviour management
BehaviourManager * | getBehaviourManager() |
const BehaviourManager * | getBehaviourManager() const |
Documentation
function
MinSG::SceneManagement::SceneManager::SceneManager
public |
SceneManager( | ) |
Defined in MinSG/SceneManagement/SceneManager.h:47
function
MinSG::SceneManagement::SceneManager::~SceneManager
public |
~SceneManager( | ) |
Defined in MinSG/SceneManagement/SceneManager.h:48
function
MinSG::SceneManagement::SceneManager::registerNode
public |
void registerNode( | const Util::StringIdentifier & | id, |
Util::Reference < Node > | node | |
) |
Associate a Node with an id. The id is NOT saved inside the node. A Node can have only one id and ids are unique per SceneManager .
Parameters
- id
- The associated unique id of the node.
- node
- The Node to register.
Defined in MinSG/SceneManagement/SceneManager.h:69
function
MinSG::SceneManagement::SceneManager::registerNode
public |
void registerNode( | Util::Reference < Node > | node ) |
If the [Node](classMinSG_1_1Node)
is not registered, register the node with a new random id.
Defined in MinSG/SceneManagement/SceneManager.h:72
function
MinSG::SceneManagement::SceneManager::registerGeometryNodes
public |
void registerGeometryNodes( | Node * | rootNode ) |
Traverse the givensubtree
and register all GeometryNodes which are not registered.
Defined in MinSG/SceneManagement/SceneManager.h:75
function
MinSG::SceneManagement::SceneManager::unregisterNode
public |
void unregisterNode( | const Util::StringIdentifier & | id ) |
Remove the association of a Node with the givenid
.
Defined in MinSG/SceneManagement/SceneManager.h:78
function
MinSG::SceneManagement::SceneManager::getNameOfRegisteredNode
public | const | inline |
std::string getNameOfRegisteredNode( | Node * | node ) const |
Return the registered id of the given [Node](classMinSG_1_1Node)
. The result is empty if the node is not registered.
Defined in MinSG/SceneManagement/SceneManager.h:81
function
MinSG::SceneManagement::SceneManager::getNameIdOfRegisteredNode
public | const | inline |
Util::StringIdentifier getNameIdOfRegisteredNode( | Node * | node ) const |
Defined in MinSG/SceneManagement/SceneManager.h:82
function
MinSG::SceneManagement::SceneManager::getNodeId
public | const |
Util::StringIdentifier getNodeId( | Node * | node ) const |
Defined in MinSG/SceneManagement/SceneManager.h:83
function
MinSG::SceneManagement::SceneManager::getRegisteredNode
public | const |
Node * getRegisteredNode( | const Util::StringIdentifier & | id ) const |
Return the Node associated with the givenid
or nullptr, if ther is no node with that id.
Defined in MinSG/SceneManagement/SceneManager.h:86
function
MinSG::SceneManagement::SceneManager::getNamesOfRegisteredNodes
public | const |
void getNamesOfRegisteredNodes( | std::vector< std::string > & | ids ) const |
Return the ids of all registered Nodes.
Parameters
- ids
- List of ids that is returned.
Defined in MinSG/SceneManagement/SceneManager.h:93
function
MinSG::SceneManagement::SceneManager::getNodeIds
public | const |
std::vector< Util::StringIdentifier > getNodeIds( | ) const |
Defined in MinSG/SceneManagement/SceneManager.h:94
function
MinSG::SceneManagement::SceneManager::isNodeRegistered
public | const |
bool isNodeRegistered( | Node * | node ) const |
Check if the given node is registered.
Parameters
- node
- The node.
Parameters
:
Defined in MinSG/SceneManagement/SceneManager.h:103
function
MinSG::SceneManagement::SceneManager::createInstance
public | const |
Node * createInstance( | const Util::StringIdentifier & | id ) const |
Defined in MinSG/SceneManagement/SceneManager.h:105
function
MinSG::SceneManagement::SceneManager::registerState
public |
void registerState( | const Util::StringIdentifier & | id, |
Util::Reference < State > | state | |
) |
Associates a State with a id. The id is NOT saved inside the State . A State can have only one id; ids are unique per SceneManager .
Parameters
- id
- The associated unique id of the state.
- state
- The Node .
Defined in MinSG/SceneManagement/SceneManager.h:122
function
MinSG::SceneManagement::SceneManager::registerState
public |
void registerState( | Util::Reference < State > | state ) |
If the State is not already registered, the state is registered with a new random Name.
Parameters
- state
- The Node .
Defined in MinSG/SceneManagement/SceneManager.h:127
function
MinSG::SceneManagement::SceneManager::unregisterState
public |
void unregisterState( | const Util::StringIdentifier & | id ) |
The association of a state with a given id is removed.
Parameters
- id
- A registered id.
Defined in MinSG/SceneManagement/SceneManager.h:132
function
MinSG::SceneManagement::SceneManager::getNameOfRegisteredState
public | const | inline |
std::string getNameOfRegisteredState( | State * | state ) const |
Returns the registered id of a State .
Parameters
- state
- The State .
Returns
The associated id or “”, if state was not regiestered.
Defined in MinSG/SceneManagement/SceneManager.h:137
function
MinSG::SceneManagement::SceneManager::getStateId
public | const |
Util::StringIdentifier getStateId( | State * | state ) const |
Defined in MinSG/SceneManagement/SceneManager.h:138
function
MinSG::SceneManagement::SceneManager::getRegisteredState
public | const |
State * getRegisteredState( | const Util::StringIdentifier & | id ) const |
Returns the State registered to a id.
Parameters
- id
- The registered id.
Returns
The registered State or nullptr.
Defined in MinSG/SceneManagement/SceneManager.h:143
function
MinSG::SceneManagement::SceneManager::getStateIds
public | const |
std::vector< Util::StringIdentifier > getStateIds( | ) const |
Defined in MinSG/SceneManagement/SceneManager.h:145
function
MinSG::SceneManagement::SceneManager::getNamesOfRegisteredStates
public | const |
void getNamesOfRegisteredStates( | std::vector< std::string > & | ids ) const |
Defined in MinSG/SceneManagement/SceneManager.h:146
function
MinSG::SceneManagement::SceneManager::getBehaviourManager
public |
BehaviourManager * getBehaviourManager( | ) |
Defined in MinSG/SceneManagement/SceneManager.h:156
function
MinSG::SceneManagement::SceneManager::getBehaviourManager
public | const |
const BehaviourManager * getBehaviourManager( | ) const |
Defined in MinSG/SceneManagement/SceneManager.h:157