Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes

# NodePathCollection Class Reference

This is a set of zero or more NodePaths. More...

List of all members.

## Public Member Functions
| NodePathCollection ()
| NodePathCollection (NodePathCollection const copy)
| NodePathCollection (PyObject self, PyObject sequence)
| This special constructor accepts a Python list of NodePaths.
| addPath (NodePath const node_path)
| Adds a new NodePath to the collection.
| addPathsFrom (NodePathCollection const other)
| Adds all the NodePaths indicated in the other collection to this path.
| append (NodePath const node_path)
| Adds a new NodePath to the collection.
| clear ()
| Removes all NodePaths from the collection.
| composeColorScale (float r, float g, float b)
| Applies color scales to all NodePaths in the collection.
| composeColorScale (VBase4 const scale, int priority)
| Applies color scales to all NodePaths in the collection.
| composeColorScale (VBase4 const scale)
| Applies color scales to all NodePaths in the collection.
| composeColorScale (float r, float g, float b, float a, int priority)
| Applies color scales to all NodePaths in the collection.
| composeColorScale (float r, float g, float b, float a)
| Applies color scales to all NodePaths in the collection.
| detach ()
| Detaches all NodePaths in the collection.
| extend (NodePathCollection const other)
| Appends the other list onto the end of this one.
NodePathCollection | findAllMatches (string path)
| Returns the complete set of all NodePaths that begin with any NodePath in this collection and can be extended by path.
BitMaskunsigned | getCollideMask ()
int | getNumPaths ()
| Returns the number of NodePaths in the collection.
NodePath | getPath (int index)
| Returns the nth NodePath in the collection.
list | getPaths ()
bool | hasPath (NodePath const path)
| Returns true if the indicated NodePath appears in this collection, false otherwise.
| hide ()
| Hides all NodePaths in the collection.
bool | isEmpty ()
| Returns true if there are no NodePaths in the collection, false otherwise.
| ls ()
| Lists all the nodes at and below each node in the collection hierarchically.
| ls (ostream out, int indent_level)
| Lists all the nodes at and below each node in the collection hierarchically.
| ls (ostream out)
| Lists all the nodes at and below each node in the collection hierarchically.
NodePathCollection | operator+ (NodePathCollection const other)
| Returns a NodePathCollection representing the concatenation of the two lists.
NodePathCollection | operator+= (NodePathCollection const other)
| Appends the other list onto the end of this one.
NodePathCollection | operator= (NodePathCollection const copy)
NodePath | operator[] (int index)
| Returns the nth NodePath in the collection.
| output (ostream out)
| Writes a brief one-line description of the NodePathCollection to the indicated output stream.
PyObject | reduce (PyObject self)
| This special Python method is implement to provide support for the pickle module.
| removeDuplicatePaths ()
| Removes any duplicate entries of the same NodePaths on this collection.
bool | removePath (NodePath const node_path)
| Removes the indicated NodePath from the collection.
| removePathsFrom (NodePathCollection const other)
| Removes from this collection all of the NodePaths listed in the other collection.
| reparentTo (NodePath const other)
| Reparents all the NodePaths in the collection to the indicated node.
| setAttrib (RenderAttrib const attrib)
| Applies the indicated RenderAttrib to all NodePaths in the collection.
| setAttrib (RenderAttrib const attrib, int priority)
| Applies the indicated RenderAttrib to all NodePaths in the collection.
| setCollideMask (BitMaskunsigned int, 32 new_mask, BitMaskunsigned int, 32 bits_to_change)
| Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.
| setCollideMask (BitMaskunsigned int, 32 new_mask, BitMaskunsigned int, 32 bits_to_change, TypeHandle node_type)
| Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.
| setCollideMask (BitMaskunsigned int, 32 new_mask)
| Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.
| setColor (float r, float g, float b, float a, int priority)
| Colors all NodePaths in the collection.
| setColor (VBase4 const color)
| Colors all NodePaths in the collection.
| setColor (float r, float g, float b, float a)
| Colors all NodePaths in the collection.
| setColor (VBase4 const color, int priority)
| Colors all NodePaths in the collection.
| setColor (float r, float g, float b)
| Colors all NodePaths in the collection.
| setColorScale (float r, float g, float b, float a)
| Applies color scales to all NodePaths in the collection.
| setColorScale (VBase4 const scale)
| Applies color scales to all NodePaths in the collection.
| setColorScale (float r, float g, float b)
| Applies color scales to all NodePaths in the collection.
| setColorScale (VBase4 const scale, int priority)
| Applies color scales to all NodePaths in the collection.
| setColorScale (float r, float g, float b, float a, int priority)
| Applies color scales to all NodePaths in the collection.
| setTexture (TextureStage stage, Texture tex, int priority)
| Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage.
| setTexture (TextureStage stage, Texture tex)
| Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage.
| setTexture (Texture tex)
| Adds the indicated texture to the list of textures that will be rendered on the default texture stage.
| setTexture (Texture tex, int priority)
| Adds the indicated texture to the list of textures that will be rendered on the default texture stage.
| setTextureOff (TextureStage stage, int priority)
| Sets the geometry at this level and below to render using no texture, on the indicated stage.
| setTextureOff (TextureStage stage)
| Sets the geometry at this level and below to render using no texture, on the indicated stage.
| setTextureOff ()
| Sets the geometry at this level and below to render using no texture, on any stage.
| setTextureOff (int priority)
| Sets the geometry at this level and below to render using no texture, on any stage.
| show ()
| Shows all NodePaths in the collection.
int | size ()
| Returns the number of paths in the collection.
| stash ()
| Stashes all NodePaths in the collection.
| unstash ()
| Unstashes all NodePaths in the collection.
| write (ostream out)
| Writes a complete multi-line description of the NodePathCollection to the indicated output stream.
| write (ostream out, int indent_level)
| Writes a complete multi-line description of the NodePathCollection to the indicated output stream.
| wrtReparentTo (NodePath const other)
| Reparents all the NodePaths in the collection to the indicated node, adjusting each transform so as not to move in world coordinates.
## Public Attributes
BitMaskunsigned | int
| Returns the union of all of the into_collide_masks for nodes at this level and below.

## Detailed Description

This is a set of zero or more NodePaths.

It's handy for returning from functions that need to return multiple NodePaths (for instance, NodePaths.get_children).

## Constructor & Destructor Documentation

NodePathCollection | ( |  | ) |

NodePathCollection | ( | NodePathCollection const | copy | ) |

NodePathCollection | ( | PyObject | self,
|  | PyObject | sequence
| ) |  |

This special constructor accepts a Python list of NodePaths.

Since this constructor accepts a generic PyObject *, it should be the last constructor listed in the class record.

## Member Function Documentation

addPath | ( | NodePath const | node_path | ) |

Adds a new NodePath to the collection.

addPathsFrom | ( | NodePathCollection const | other | ) |

Adds all the NodePaths indicated in the other collection to this path.

The other paths are simply appended to the end of the paths in this list; duplicates are not automatically removed.

append | ( | NodePath const | node_path | ) |

Adds a new NodePath to the collection.

This method duplicates the add_path() method; it is provided to satisfy Python's naming convention.

clear | ( |  | ) |

Removes all NodePaths from the collection.

composeColorScale | ( | VBase4 const | scale,
|  | int | priority
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale, if any, is multiplied by the specified color scale.

composeColorScale | ( | VBase4 const | scale | ) |

Applies color scales to all NodePaths in the collection.

The existing color scale, if any, is multiplied by the specified color scale.

composeColorScale | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a,
|  | int | priority
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale, if any, is multiplied by the specified color scale.

composeColorScale | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale, if any, is multiplied by the specified color scale.

composeColorScale | ( | float | r,
|  | float | g,
|  | float | b
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale, if any, is multiplied by the specified color scale.

detach | ( |  | ) |

Detaches all NodePaths in the collection.

extend | ( | NodePathCollection const | other | ) |

Appends the other list onto the end of this one.

This method duplicates the += operator; it is provided to satisfy Python's naming convention.

NodePathCollection findAllMatches | ( | string | path | ) |

Returns the complete set of all NodePaths that begin with any NodePath in this collection and can be extended by path.

The shortest paths will be listed first.

BitMaskunsigned getCollideMask | ( |  | ) |

int getNumPaths | ( |  | ) |

Returns the number of NodePaths in the collection.

NodePath getPath | ( | int | index | ) |

Returns the nth NodePath in the collection.

list getPaths | ( |  | ) |

bool hasPath | ( | NodePath const | path | ) |

Returns true if the indicated NodePath appears in this collection, false otherwise.

hide | ( |  | ) |

Hides all NodePaths in the collection.

bool isEmpty | ( |  | ) |

Returns true if there are no NodePaths in the collection, false otherwise.

ls | ( |  | ) |

Lists all the nodes at and below each node in the collection hierarchically.

ls | ( | ostream | out,
|  | int | indent_level
| ) |  |

Lists all the nodes at and below each node in the collection hierarchically.

ls | ( | ostream | out | ) |

Lists all the nodes at and below each node in the collection hierarchically.

NodePathCollection operator+ | ( | NodePathCollection const | other | ) |

Returns a NodePathCollection representing the concatenation of the two lists.

NodePathCollection operator+= | ( | NodePathCollection const | other | ) |

Appends the other list onto the end of this one.

NodePathCollection operator= | ( | NodePathCollection const | copy | ) |

NodePath operator[] | ( | int | index | ) |

Returns the nth NodePath in the collection.

This is the same as get_path(), but it may be a more convenient way to access it.

output | ( | ostream | out | ) |

Writes a brief one-line description of the NodePathCollection to the indicated output stream.

PyObject reduce | ( | PyObject | self | ) |

This special Python method is implement to provide support for the pickle module.

removeDuplicatePaths | ( |  | ) |

Removes any duplicate entries of the same NodePaths on this collection.

If a NodePath appears multiple times, the first appearance is retained; subsequent appearances are removed.

bool removePath | ( | NodePath const | node_path | ) |

Removes the indicated NodePath from the collection.

Returns true if the path was removed, false if it was not a member of the collection.

removePathsFrom | ( | NodePathCollection const | other | ) |

Removes from this collection all of the NodePaths listed in the other collection.

reparentTo | ( | NodePath const | other | ) |

Reparents all the NodePaths in the collection to the indicated node.

setAttrib | ( | RenderAttrib const | attrib,
|  | int | priority
| ) |  |

Applies the indicated RenderAttrib to all NodePaths in the collection.

An effort is made to apply the attrib to many NodePaths as quickly as possible; redundant RenderState compositions are not duplicated.

setAttrib | ( | RenderAttrib const | attrib | ) |

Applies the indicated RenderAttrib to all NodePaths in the collection.

An effort is made to apply the attrib to many NodePaths as quickly as possible; redundant RenderState compositions are not duplicated.

setCollideMask | ( | BitMaskunsigned | int,
|  | 32 | new_mask,
|  | BitMaskunsigned | int,
|  | 32 | bits_to_change
| ) |  |

Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.

Only nodes

The default is to change all bits, but if bits_to_change is not all bits on, then only the bits that are set in bits_to_change are modified, allowing this call to change only a subset of the bits in the subgraph.

setCollideMask | ( | BitMaskunsigned | int,
|  | 32 | new_mask
| ) |  |

Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.

Only nodes

The default is to change all bits, but if bits_to_change is not all bits on, then only the bits that are set in bits_to_change are modified, allowing this call to change only a subset of the bits in the subgraph.

setCollideMask | ( | BitMaskunsigned | int,
|  | 32 | new_mask,
|  | BitMaskunsigned | int,
|  | 32 | bits_to_change,
|  | TypeHandle | node_type
| ) |  |

Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.

Only nodes

The default is to change all bits, but if bits_to_change is not all bits on, then only the bits that are set in bits_to_change are modified, allowing this call to change only a subset of the bits in the subgraph.

setColor | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a
| ) |  |

Colors all NodePaths in the collection.

setColor | ( | VBase4 const | color | ) |

Colors all NodePaths in the collection.

setColor | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a,
|  | int | priority
| ) |  |

Colors all NodePaths in the collection.

setColor | ( | VBase4 const | color,
|  | int | priority
| ) |  |

Colors all NodePaths in the collection.

setColor | ( | float | r,
|  | float | g,
|  | float | b
| ) |  |

Colors all NodePaths in the collection.

setColorScale | ( | VBase4 const | scale,
|  | int | priority
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale is replaced.

setColorScale | ( | VBase4 const | scale | ) |

Applies color scales to all NodePaths in the collection.

The existing color scale is replaced.

setColorScale | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale is replaced.

setColorScale | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a,
|  | int | priority
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale is replaced.

setColorScale | ( | float | r,
|  | float | g,
|  | float | b
| ) |  |

Applies color scales to all NodePaths in the collection.

The existing color scale is replaced.

setTexture | ( | TextureStage | stage,
|  | Texture | tex,
|  | int | priority
| ) |  |

Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage.

If there are multiple texture stages specified (possibly on multiple different nodes at different levels), they will all be applied to geometry together, according to the stage specification set up in the TextureStage object.

setTexture | ( | TextureStage | stage,
|  | Texture | tex
| ) |  |

Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage.

If there are multiple texture stages specified (possibly on multiple different nodes at different levels), they will all be applied to geometry together, according to the stage specification set up in the TextureStage object.

setTexture | ( | Texture | tex,
|  | int | priority
| ) |  |

Adds the indicated texture to the list of textures that will be rendered on the default texture stage.

This is the deprecated single-texture variant of this method; it is now superceded by set_texture() that accepts a stage and texture. However, this method may be used in the presence of multitexture if you just want to adjust the default stage.

setTexture | ( | Texture | tex | ) |

Adds the indicated texture to the list of textures that will be rendered on the default texture stage.

This is the deprecated single-texture variant of this method; it is now superceded by set_texture() that accepts a stage and texture. However, this method may be used in the presence of multitexture if you just want to adjust the default stage.

setTextureOff | ( |  | ) |

Sets the geometry at this level and below to render using no texture, on any stage.

This is different from not specifying a texture; rather, this specifically contradicts set_texture() at a higher node level (or, with a priority, overrides a set_texture() at a lower level).

setTextureOff | ( | TextureStage | stage,
|  | int | priority
| ) |  |

Sets the geometry at this level and below to render using no texture, on the indicated stage.

This is different from not specifying a texture; rather, this specifically contradicts set_texture() at a higher node level (or, with a priority, overrides a set_texture() at a lower level).

setTextureOff | ( | TextureStage | stage | ) |

Sets the geometry at this level and below to render using no texture, on the indicated stage.

This is different from not specifying a texture; rather, this specifically contradicts set_texture() at a higher node level (or, with a priority, overrides a set_texture() at a lower level).

setTextureOff | ( | int | priority | ) |

Sets the geometry at this level and below to render using no texture, on any stage.

This is different from not specifying a texture; rather, this specifically contradicts set_texture() at a higher node level (or, with a priority, overrides a set_texture() at a lower level).

show | ( |  | ) |

Shows all NodePaths in the collection.

int size | ( |  | ) |

Returns the number of paths in the collection.

This is the same thing as get_num_paths().

stash | ( |  | ) |

Stashes all NodePaths in the collection.

unstash | ( |  | ) |

Unstashes all NodePaths in the collection.

write | ( | ostream | out | ) |

Writes a complete multi-line description of the NodePathCollection to the indicated output stream.

write | ( | ostream | out,
|  | int | indent_level
| ) |  |

Writes a complete multi-line description of the NodePathCollection to the indicated output stream.

wrtReparentTo | ( | NodePath const | other | ) |

Reparents all the NodePaths in the collection to the indicated node, adjusting each transform so as not to move in world coordinates.

## Member Data Documentation

BitMaskunsigned int

Returns the union of all of the into_collide_masks for nodes at this level and below.

This is the same thing as node()->get_net_collide_mask().

If you want to return what the into_collide_mask of this node itself is, without regard to its children, use node()->get_into_collide_mask().

All Classes Namespaces Functions Variables Enumerations Enumerator Properties