#include <sglGroup.hpp>
Inheritance diagram for sglGroup::
Public Methods | |
sglGroup () | |
virtual | ~sglGroup () |
unsigned int | getNumChildren () const |
virtual bool | addChild (sglNode *child) |
virtual bool | removeChild (sglNode *child) |
virtual bool | insertChild (unsigned int index, sglNode *child) |
virtual sglNode* | replaceChild (unsigned int index, sglNode *child) |
virtual sglNode* | removeChild (unsigned int index) |
sglNode* | getChild (unsigned int index) |
int | searchChild (sglNode *child, unsigned int start=0) const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectf &isector) const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectd &isector) const |
virtual void | pick (sglPickf &pick_state, unsigned int cull_flags) const |
virtual void | pick (sglPickd &pick_state, unsigned int cull_flags) const |
virtual void | preDraw (const PreDrawStruct &trav_state) |
virtual sglNode* | clone (unsigned int mode) const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Methods | |
virtual void | computeBound () |
virtual void | computeBoundsRecursiveDown () |
virtual void | cull (sglCull< float > &trav_state, unsigned int cull_flags) const |
virtual void | cull (sglCull< double > &trav_state, unsigned int cull_flags) const |
void | copyTo (sglGroup *dst, unsigned int mode) const |
Protected Attributes | |
vector<sglNode*> | m_child_list |
When the traversal funtions get to an sglGroup node it will visit all of the children. Note that just because the child list is internally stored as an ordered list of sglNode's, this order does not in any way determine the order in which children get traversed or rendered (unless a subclass dictates otherwise.
Example:
sglGroup *parent = new sglGroup; sglGroup *child1 = new sglGroup; unsigned int num; parent->addChild(child1); num = parent->getRefCount(); // returns 0 num = parent->getNumChildren(); // returns 1 num = child1->getRefCount(); // returns 1 num = child1->getNumParents(); // returns 1 parent->remove(child1); num = parent->getNumChildren(); // returns 0 num = child1->getRefCount(); // returns 0 num = child1->getNumParents(); // returns 0
Definition at line 77 of file sglGroup.hpp.
|
default constructor.
|
|
destructor.
|
|
Get the number of child nodes in this group.
Definition at line 88 of file sglGroup.hpp. |
|
Add child to the end of the list.
Reimplemented in sglKeyFrameAnimation, and sglTimedAnimation. |
|
Remove the last instance of the child from the list
Reimplemented in sglKeyFrameAnimation, and sglTimedAnimation. |
|
Insert a child at a specific index. Valid indices are in the range [0,getNumChildren()].
Reimplemented in sglKeyFrameAnimation, and sglTimedAnimation. |
|
Replace child at given index where the valid range is [0,getNumChildren()-1].
|
|
Removes child at position index (valid indices: [0,getNumChildren()-1]). Nodes after this in the list then shift down one index.
Reimplemented in sglKeyFrameAnimation, and sglTimedAnimation. |
|
Get a pointer to the child at the given index (valid indices: [0,getNumChildren()-1]).
|
|
Find the index of the first occurrence of a specified child at or after a particular index.
|
|
The single precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglNode. Reimplemented in sglBillboard, sglBitMaskSwitch, sglDiscriminator, sglDistanceSwitch, sglLOD, sglKeyFrameAnimation, sglLOD, sglLODStateNode, sglScale, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. |
|
The double precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglNode. Reimplemented in sglBillboard, sglBitMaskSwitch, sglDiscriminator, sglDistanceSwitch, sglLOD, sglKeyFrameAnimation, sglLOD, sglLODStateNode, sglScale, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. |
|
The single precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglNode. Reimplemented in sglBillboard, sglBitMaskSwitch, sglDiscriminator, sglDistanceSwitch, sglLOD, sglKeyFrameAnimation, sglLOD, sglLODStateNode, sglScale, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. |
|
The double precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglNode. Reimplemented in sglBillboard, sglBitMaskSwitch, sglDiscriminator, sglDistanceSwitch, sglLOD, sglKeyFrameAnimation, sglLOD, sglLODStateNode, sglScale, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. |
|
This is the pre-draw traversal function which should be called before intersecting or culling the scene graph. This "cleans" the tree by computing the bound boxes and spheres that have been marked as dirty, building display lists for geometry that has changed, binding textures that need to be, updating the animation nodes whose state has changed. This should be called with a valid graphics context current.
Reimplemented from sglNode. Reimplemented in sglKeyFrameAnimation, sglScene, and sglTimedAnimation. Referenced by sglScene::preDraw(). |
|
Make a copy of the scenegraph rooted at this node.
Reimplemented from sglNode. Reimplemented in sglBillboard, sglBitMaskSwitch, sglCallback, sglDefaultStateNode, sglDiscriminator, sglDistanceSwitch, sglLOD, sglIndexedBitMaskSwitch, sglKeyFrameAnimation, sglLayer, sglLOD, sglLODStateNode, sglOrderedGroup, sglOverrideStateNode, sglScale, sglScene, sglSphericalTransform, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. |
|
Output the state of this node to the specified ostream.
Reimplemented from sglNode. Reimplemented in sglAnimation, sglBillboard, sglBitMaskSwitch, sglCallback, sglDefaultStateNode, sglDiscriminator, sglDistanceSwitch, sglLOD, sglIndexedBitMaskSwitch, sglKeyFrameAnimation, sglLayer, sglLOD, sglLODStateNode, sglOrderedGroup, sglOverrideStateNode, sglScale, sglScene, sglSphericalTransform, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. |
|
The single precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglNode. Reimplemented in sglBillboard, sglBitMaskSwitch, sglCallback, sglDefaultStateNode, sglDiscriminator, sglDistanceSwitch, sglLOD, sglKeyFrameAnimation, sglLayer, sglLOD, sglLODStateNode, sglOrderedGroup, sglOverrideStateNode, sglScale, sglScene, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. Referenced by sglSwitch::cull(), sglScene::cull(), and sglBitMaskSwitch::cull(). |
|
The double precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglNode. Reimplemented in sglBillboard, sglBitMaskSwitch, sglCallback, sglDefaultStateNode, sglDiscriminator, sglDistanceSwitch, sglLOD, sglKeyFrameAnimation, sglLayer, sglLOD, sglLODStateNode, sglOrderedGroup, sglOverrideStateNode, sglScale, sglScene, sglSwitch, sglTimedAnimation, sglTransform, sglTranslate, sglUnProject, sglUnScale, and sglUnScaleRange. |