Public Member Functions | |
| Stacks () | |
| Stacks (ChipBank *chipBank) | |
| virtual bool | addStack (Stack *stack) |
| virtual bool | replaceStack (Stack *origStack, Stack *newStack) |
| virtual bool | setStack (unsigned int index, Stack *stack) |
| unsigned int | getNumStacks () const |
| Stack * | getStack (unsigned int index) |
| const Stack * | getStack (unsigned int index) const |
| bool | unserialize (struct _xmlDoc *doc, osgDB::Registry *registry) |
| bool | unserialize (const std::string &fileName, osgDB::Registry *registry) |
All osgchips::Stack instances must be children of an osgchips::Stacks instance to be displayed. It provides a square bounding box (osgchips::Stacks do not provide bounding boxes) and picking based on the bounding box. As a result, osgchips::Stacks will behave as expected if the stacks are close to each other. If there are large gaps between them, the gaps will be included in the bounding box.
osgchips::Stacks is publicly derived from osg::Geode and imposes a single constraints in the use of public osg::Geode methods by the application: instead of using getNumChildren, addChild, replaceChild, getChild and setChild the application must use getNumStacks, addStack, replaceStack, getStack and setStack respectively.
|
|
Create an osgchips::Stack container that relies on the osgchips::ChipBank singleton for chip mesh information. |
|
|
Create an osgchips::Stack container that relies on chipBank for chip mesh information.
|
|
|
Append stack to the list of children.
|
|
|
Return the current number of stacks.
|
|
|
Return a read only pointer to the stack at position index in the list of children.
|
|
|
Return a pointer to the stack at position index in the list of children.
|
|
||||||||||||
|
Remove origStack from the list of children and insert newStack at the same position.
|
|
||||||||||||
|
Insert stack at position index in the list of children, shifting the children already at position index or above.
|
|
||||||||||||
|
Parse the fileName and interpret any osgchips XML element to fill the osgchips::ChipBank singleton. The registry can be obtained by the osgDB::Registry::instance() static method. See the other prototype for more information.
|
|
||||||||||||
|
Look for an osgchips XML element and fill the osgchips::ChipBank singleton. The registry can be obtained by the osgDB::Registry::instance() static method. It is not mandatory for the XML document to contain an osgchips element. The XML document may contain more than one osgchips element. Each element will add content to the osgchips::ChipBank singleton and add children to the container.
|
1.3.9.1