osg.Group¶
-
class
osg.
Group
¶ Represents: c++ class Wraps: osg::Group Bases: osg.Node
General group node which maintains a list of children. Children are reference counted. This allows children to be shared with memory management handled automatically via
osg.Referenced
.Constructors:
-
osg.
Group
()¶
Methods:
-
:
getNumChildren
()¶ Return the number of children nodes.
Тип результата: unsigned
-
:
insertChild
(unsigned index, osg.Node child)¶ Insert
osg.Node
toosg.Group
at specific location. The new child node is inserted into the child list before the node at the specified index. No nodes are removed from the group with this operation.Параметры: - index (
unsigned
) – - child (
osg.Node
) –
Тип результата: bool
- index (
-
:
addChild
(osg.Node child)¶ Add
osg.Node
toosg.Group
. If node is notnil
then increment its reference count, add it to the child list and dirty the bounding sphere to force it to recompute on nextosg.Node.getBound()
and returntrue
for success. Otherwise returnfalse
. Scene nodes can’t be added as child nodes.Параметры: child ( osg.Node
) –Тип результата: bool
-
:
removeChild
(osg.Node child)¶ Remove
osg.Node
fromosg.Group
. Ifosg.Node
is contained inosg.Group
then remove it from the child list, decrement its reference count, and dirty the bounding sphere to force it to recompute on nextosg.Node.getBound()
and returntrue
for success. Ifosg.Node
is not found then returnfalse
and do not change the reference count of theosg.Node
. Note (for C++), do not override, only overrideremoveChildren(,)
is required.Параметры: child ( osg.Node
) –Тип результата: bool
-
:
removeChild
(unsigned pos) -
Параметры: pos ( unsigned
) –Тип результата: bool
-
:
removeChildren
(unsigned pos, unsigned numChildrenToRemove)¶ -
Параметры: - pos (
unsigned
) – - numChildrenToRemove (
unsigned
) –
Тип результата: bool
- pos (
-
:
getChild
(unsigned i)¶ Return child node at position i.
Параметры: i ( unsigned
) –Тип результата: osg.Node
-
:
replaceChild
(osg.Node orig, osg.Node newChild)¶ Replace specified child
osg.Node
with anotherosg.Node
. Equivalent tosetChild(getChildIndex(orignChild), node)
. See docs forosg.Group.setChild()
for further details on implementation.Параметры: Тип результата: bool
-
:
getChildIndex
(osg.Node child)¶ Get the index number of child, return a value between
0
and_children.size() - 1
if found, if not found then return_children.size()
.Параметры: child ( osg.Node
) –Тип результата: unsigned
-
:
traverse_group
(osg.NodeVisitor nv)¶ -
Параметры: nv ( osg.NodeVisitor
) –
-