Public Member Functions | |
| Stack () | |
| Stack (ChipBank *chipBank) | |
| void | setCount (unsigned int count) |
| unsigned int | getCount (void) const |
| void | setPosition (const osg::Vec3 &position) |
| const osg::Vec3 & | getPosition () const |
| void | setChip (ChipBank::Chip *chip) |
| const ChipBank::Chip * | getChip () const |
| unsigned int | getValue () const |
A stack of chips of the same type. The size of the stack may be changed dynamically. The stack can be moved by modifying the center of the stack which is located at the bottom of the center of the cylinder. A stack that is not associated to an osgchips::ChipBank::Chip or that has a size of 0 is valid but is not drawn.
The stack does not support picking and is unable to calculate its own bounding box: it relies on its container (osgchips::Stacks). The type of the chip can be changed dynamically. It is the type of the chip that defines the color, transparency, texture and value of the chip.
The stack uses the texture unit 0 (if the osgchips::ChipBank::Chip has a texture) and sets the material attribute ((if the osgchips::ChipBank::Chip has a material). If a stack is made of chips that do not have textures, the caller may add its own texture without interfering. The same applies to the material. The caller must not alter the texture or the material if they are in use or unpredictable results will occur.
The behaviour of an osgchips::Stacks instance that is not a child of an osgchips::Stacks instance is undefined.
|
|
Create a one chip high stack for a yet unknown chip type. It will not be drawn unless the setChips method is called at some point. Get mesh information from the osgchips::ChipBank singleton. |
|
|
Create a one chip high stack for a yet unknown chip type. It will not be drawn unless the setChips method is called at some point. Get mesh information from the chipBank.
|
|
|
Retrieve the chip type of the stack, read only.
|
|
|
Get the height of the stack, in chips.
|
|
|
Retrieve the position of the center of the bottom of the stack. By default the stack is located on 0, 0, 0.
|
|
|
Retreive the value of a single chip in the stack.
|
|
|
Set the type of the stack to chip. It defines the material and textures to use for drawing and provides the name and value of each chip in the stack.
|
|
|
Set the stack to be count chips high. If set to 0, the chip stack will not be drawn.
|
|
|
Set the center of the bottom of the stack to position. By default the stack is located on 0, 0, 0.
|
1.3.9.1