SPIN Framework
|
Allows for selectively enabling/disabling child nodes. More...
#include <SwitchNode.h>
Public Member Functions | |
SwitchNode (SceneManager *sceneManager, const char *initID) | |
virtual void | updateNodePath () |
void | setEnabled (const char *id, int enabled) |
bool | isEnabled (ReferencedNode *n) |
void | setAll (int enabled) |
virtual std::vector< lo_message > | getState () const |
Allows for selectively enabling/disabling child nodes.
std::vector< lo_message > spin::SwitchNode::getState | ( | ) | const [virtual] |
For each subclass of ReferencedNode, we override the getState() method to fill the vector with the correct set of methods for this particular node
Reimplemented from spin::GroupNode.
bool spin::SwitchNode::isEnabled | ( | ReferencedNode * | n | ) |
Check if a particular node is a child and is enabled
void spin::SwitchNode::setAll | ( | int | enabled | ) |
Set all child noded to be either disabled or enabled
void spin::SwitchNode::setEnabled | ( | const char * | id, |
int | enabled | ||
) |
This enables/disables a child of a certain id
void spin::SwitchNode::updateNodePath | ( | ) | [virtual] |
IMPORTANT: subclasses of ReferencedNode are allowed to contain complicated subgraphs, and can also change their attachmentNode so that children are attached anywhere in that subgraph. If that is the case, the updateNodePath() function MUST be overridden, and extra nodes must be manually pushed onto currentNodePath_.