Public Types | |
typedef std::vector < ref_ptr< Shape > > | ChildList |
Public Member Functions | |
CompositeShape () | |
CompositeShape (const CompositeShape &cs, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
META_Shape (osg, CompositeShape) | |
void | setShape (Shape *shape) |
Set the shape that encloses all of the children. | |
Shape * | getShape () |
Get the shape that encloses all of the children. | |
const Shape * | getShape () const |
Get the const shape that encloses all of the children. | |
unsigned int | getNumChildren () const |
Get the number of children of this composite shape. | |
Shape * | getChild (unsigned int i) |
Get a child. | |
const Shape * | getChild (unsigned int i) const |
Get a const child. | |
void | addChild (Shape *shape) |
Add a child to the list. | |
void | removeChild (unsigned int i) |
remove a child from the list. | |
unsigned int | findChildNo (Shape *shape) const |
find the index number of child, if child is not found then it returns getNumChildren(), so should be used in similar style to STL's result!=end(). | |
Protected Member Functions | |
~CompositeShape () | |
Protected Attributes | |
ref_ptr< Shape > | _shape |
ChildList | _children |
typedef std::vector< ref_ptr<Shape> > osg::CompositeShape::ChildList |
osg::CompositeShape::CompositeShape | ( | ) | [inline] |
osg::CompositeShape::CompositeShape | ( | const CompositeShape & | cs, | |
const CopyOp & | copyop = CopyOp::SHALLOW_COPY | |||
) | [inline] |
osg::CompositeShape::~CompositeShape | ( | ) | [inline, protected] |
osg::CompositeShape::META_Shape | ( | osg | , | |
CompositeShape | ||||
) |
void osg::CompositeShape::setShape | ( | Shape * | shape | ) | [inline] |
Set the shape that encloses all of the children.
Shape* osg::CompositeShape::getShape | ( | ) | [inline] |
Get the shape that encloses all of the children.
const Shape* osg::CompositeShape::getShape | ( | ) | const [inline] |
Get the const shape that encloses all of the children.
unsigned int osg::CompositeShape::getNumChildren | ( | ) | const [inline] |
Get the number of children of this composite shape.
Shape* osg::CompositeShape::getChild | ( | unsigned int | i | ) | [inline] |
Get a child.
const Shape* osg::CompositeShape::getChild | ( | unsigned int | i | ) | const [inline] |
Get a const child.
void osg::CompositeShape::addChild | ( | Shape * | shape | ) | [inline] |
Add a child to the list.
void osg::CompositeShape::removeChild | ( | unsigned int | i | ) | [inline] |
remove a child from the list.
unsigned int osg::CompositeShape::findChildNo | ( | Shape * | shape | ) | const [inline] |
find the index number of child, if child is not found then it returns getNumChildren(), so should be used in similar style to STL's result!=end().
ref_ptr<Shape> osg::CompositeShape::_shape [protected] |
ChildList osg::CompositeShape::_children [protected] |