#include <ddggroup.h>
Class diagram for ddgGroup:
Public Members | |||
ddgGroup ( ) | |||
Constructor. | |||
virtual | ~ddgGroup ( void ) | ||
Delete this group list and any of its children. | |||
ddgNode* | add ( ddgNode* n ) | ||
Add an entity to the list. | |||
bool | remove ( ddgNode* n, bool k = false) | ||
Remove an node from the list. More... | |||
ddgNode* | index ( unsigned long n ) const | ||
Find the nth node in the group. More... | |||
long | which ( ddgNode *n ) const | ||
Determine which position the entity has in the list. More... | |||
long | size ( void ) const | ||
Return the current number of entities in the list. | |||
bool | init (ddgContext *ctx) | ||
Initialize all nodes in the group. More... | |||
bool | draw ( ddgContext *c ) | ||
Render all the members of the group. More... |
The Entities are added the end of the list or sorted by their name. DGroups automatically allocate additional blocks of space as needed and free blocks of space when no longer needed. DGroups can also be searched for entities. DGroups may also be unique and only allow one entity of each name. An empty DGroup will not reserve any space.
bool ddgGroup::remove (ddgNode * n, bool k = false) |
Remove an node from the list.
The kill flag indicates the the node should also be delete.
ddgNode * ddgGroup::index (unsigned long n) const [inline]
|
Find the nth node in the group.
Return 0 if out of range.
long ddgGroup::which (ddgNode * n) const |
Determine which position the entity has in the list.
Return NULL if the entity is not in the list.
bool ddgGroup::init (ddgContext * ctx) [virtual]
|
Initialize all nodes in the group.
If any member returns true, further initialization is aborted.
Reimplemented from ddgNode.
Reimplemented in ddgClipper, ddgFog, ddgForest, ddgReflection, and ddgScene.
bool ddgGroup::draw (ddgContext * ctx) [virtual]
|
Render all the members of the group.
If any member returns true, further rendering is aborted.
Reimplemented from ddgNode.
Reimplemented in ddgClipper, ddgFog, ddgForest, ddgLightModel, ddgReflection, ddgScene, ddgTransform, and ddgUIGroup.