# NodePathCollection

from pandac.PandaModules import NodePathCollection

Class : NodePathCollection
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).

## Inheritance:

NodePathCollection:

## Methods of NodePathCollection:

addPath
addPathsFrom
clear
composeColorScale
detach
findAllMatches
getCollideMask
getNumPaths
getPath
hasPath
hide
isEmpty
ls
operator =
operator []
output
removeDuplicatePaths
removePath
removePathsFrom
reparentTo
setAttrib
setCollideMask
setColor
setColorScale
setTexture
setTextureOff
show
stash
unstash
write
wrtReparentTo

addPath void NodePathCollection::add_path(NodePath const &node_path); Description: Adds a new NodePath to the collection.

addPathsFrom void NodePathCollection::add_paths_from(NodePathCollection const &other); Description: 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.

clear void NodePathCollection::clear(void); Description: Removes all NodePaths from the collection.

composeColorScale void NodePathCollection::compose_color_scale(float r, float g, float b, float a = (1), int priority = (0)); Description: Applies color scales to all NodePaths in the collection. The existing color scale, if any, is multiplied by the specified color scale.

detach void NodePathCollection::detach(void); Description: Detaches all NodePaths in the collection.

findAllMatches NodePathCollection NodePathCollection::find_all_matches(string const &path) const; Description: 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.

getCollideMask BitMask< unsigned int, 32 > NodePathCollection::get_collide_mask(void) const; Description: 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().

getNumPaths int NodePathCollection::get_num_paths(void) const; Description: Returns the number of NodePaths in the collection.

getPath NodePath NodePathCollection::get_path(int index) const; Description: Returns the nth NodePath in the collection.

hasPath bool NodePathCollection::has_path(NodePath const &path) const; Description: Returns true if the indicated NodePath appears in this collection, false otherwise.

hide void NodePathCollection::hide(void); Description: Hides all NodePaths in the collection.

isEmpty bool NodePathCollection::is_empty(void) const; Description: Returns true if there are no NodePaths in the collection, false otherwise.

ls void NodePathCollection::ls(void) const; Handy operations on many NodePaths at once. Description: Lists all the nodes at and below each node in the collection hierarchically.

operator = void NodePathCollection::operator =(NodePathCollection const &copy); Description:

operator [] NodePath NodePathCollection::operator [](int index) const; Description: 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 void NodePathCollection::output(ostream &out) const; Description: Writes a brief one-line description of the NodePathCollection to the indicated output stream.

removeDuplicatePaths void NodePathCollection::remove_duplicate_paths(void); Description: 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.

removePath bool NodePathCollection::remove_path(NodePath const &node_path); Description: 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 void NodePathCollection::remove_paths_from(NodePathCollection const &other); Description: Removes from this collection all of the NodePaths listed in the other collection.

reparentTo void NodePathCollection::reparent_to(NodePath const &other); Description: Reparents all the NodePaths in the collection to the indicated node.

setAttrib void NodePathCollection::set_attrib(RenderAttrib const *attrib, int priority = (0)); Description: 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 void NodePathCollection::set_collide_mask(BitMask< unsigned int, 32 > new_mask, BitMask< unsigned int, 32 > bits_to_change = ((all_on())), TypeHandle node_type = ((none()))); Description: 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 void NodePathCollection::set_color(float r, float g, float b, float a = (1), int priority = (0)); Description: Colors all NodePaths in the collection

setColorScale void NodePathCollection::set_color_scale(float r, float g, float b, float a = (1), int priority = (0)); Description: Applies color scales to all NodePaths in the collection. The existing color scale is replaced.

setTexture void NodePathCollection::set_texture(Texture *tex, int priority = (0)); Description: 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. Description: 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.

setTextureOff void NodePathCollection::set_texture_off(int priority = (0)); Description: 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). Description: 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).

show void NodePathCollection::show(void); Description: Shows all NodePaths in the collection.

stash void NodePathCollection::stash(void); Description: Stashes all NodePaths in the collection.

unstash void NodePathCollection::unstash(void); Description: Unstashes all NodePaths in the collection.

write void NodePathCollection::write(ostream &out, int indent_level = (0)) const; Description: Writes a complete multi-line description of the NodePathCollection to the indicated output stream.

wrtReparentTo void NodePathCollection::wrt_reparent_to(NodePath const &other); Description: Reparents all the NodePaths in the collection to the indicated node, adjusting each transform so as not to move in world coordinates.