SPIN Framework
Public Member Functions

spin::SwitchNode Class Reference

Allows for selectively enabling/disabling child nodes. More...

#include <SwitchNode.h>

Inheritance diagram for spin::SwitchNode:
spin::GroupNode spin::ReferencedNode

List of all members.

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

Detailed Description

Allows for selectively enabling/disabling child nodes.


Member Function Documentation

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_.


The documentation for this class was generated from the following files: