#include <Switch.h>
Inheritance diagram for nvsg::Switch:
Public Methods | |
virtual NVSG_API const Switch * | clone (void) const |
Get a clone of this Switch object. More... | |
NVSG_API void | setActive (void) |
Set all children to active. More... | |
NVSG_API void | setActive (size_t index) |
Set one child to active. More... | |
NVSG_API void | setInactive (void) |
Set all children to inactive. More... | |
NVSG_API void | setInactive (size_t index) |
Set one child to inactive. More... | |
NVSG_API size_t | getNumberOfActive (void) const |
Get the number of active children. More... | |
NVSG_API size_t | getActive (std::vector< size_t > &indices) const |
Get indices to active child nodes. More... | |
NVSG_API bool | isActive (void) const |
Determine if any of the children is active. More... | |
NVSG_API bool | isActive (size_t index) const |
Determine if the child is active. More... | |
virtual NVSG_API bool | isDataShared (void) const |
Determine whether the data of this object is shared. More... | |
virtual NVSG_API DataID | getDataID (void) const |
Get the DataID of the data of this object. More... | |
Static Public Methods | |
NVSG_API const Switch * | create (void) |
Create Switch. More... | |
NVSG_API const Switch * | createFromBase (const Group &rhs) |
Create Switch by copying from a Group. More... | |
Protected Methods | |
NVSG_API | Switch (void) |
Default constructor. More... | |
NVSG_API | Switch (const Group &rhs) |
Partial Constructor. More... | |
NVSG_API | Switch (const Switch &rhs) |
Copy Constructor. More... | |
virtual NVSG_API | ~Switch (void) |
Prohibit explicit creation on stack by making the destructor protected. More... | |
virtual NVSG_API bool | calcBoundingSphere (void) const |
Calculate the bounding sphere of this switch. More... |
A switch node is a special kind of grouping node where one can define which children will be traversed or not (active/inactive children).
See LightSource documentation on how to use a switch for light sources.
|
Default constructor.
|
|
Partial Constructor.
|
|
Copy Constructor.
|
|
Prohibit explicit creation on stack by making the destructor protected.
|
|
Create Switch.
Reimplemented from nvsg::Group. |
|
Create Switch by copying from a Group.
|
|
Get a clone of this
Reimplemented from nvsg::Group. |
|
Set all children to active.
|
|
Set one child to active.
|
|
Set all children to inactive.
|
|
Set one child to inactive.
|
|
Get the number of active children.
|
|
Get indices to active child nodes. Copies the indices of all active child nodes to the vector /a indices.
|
|
Determine if any of the children is active.
|
|
Determine if the child is active.
|
|
Determine whether the data of this object is shared.
Reimplemented from nvsg::Group. |
|
Get the DataID of the data of this object.
Reimplemented from nvsg::Group. |
|
Calculate the bounding sphere of this switch. Calculate the bounding sphere for the active children only. If this group doesn't contain any real geometry ( for example only light sources without a bounding sphere), it doesn't have a valid bounding sphere.
Reimplemented from nvsg::Group. |