|
|
|
This is a set of zero or more NodePaths.
More...
#include "nodePathCollection.h"
List of all members.
Public Member Functions |
|
| NodePathCollection (const NodePathCollection ©) |
| void | add_path (const NodePath &node_path) |
| | Adds a new NodePath to the collection.
|
| void | add_paths_from (const NodePathCollection &other) |
| | Adds all the NodePaths indicated in the other collection to this path.
|
| void | append (const NodePath &node_path) |
| | Adds a new NodePath to the collection.
|
| void | clear () |
| | Removes all NodePaths from the collection.
|
| void | compose_color_scale (PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0) |
| | Applies color scales to all NodePaths in the collection.
|
| void | compose_color_scale (const LVecBase4 &scale, int priority=0) |
| | Applies color scales to all NodePaths in the collection.
|
| void | detach () |
| | Detaches all NodePaths in the collection.
|
| void | extend (const NodePathCollection &other) |
| | Appends the other list onto the end of this one.
|
| NodePathCollection | find_all_matches (const string &path) const |
| | Returns the complete set of all NodePaths that begin with any NodePath in this collection and can be extended by path.
|
| CollideMask | get_collide_mask () const |
| | Returns the union of all of the into_collide_masks for nodes at this level and below.
|
| int | get_num_paths () const |
| | Returns the number of NodePaths in the collection.
|
| NodePath | get_path (int index) const |
| | Returns the nth NodePath in the collection.
|
| bool | has_path (const NodePath &path) const |
| | Returns true if the indicated NodePath appears in this collection, false otherwise.
|
| void | hide () |
| | Hides all NodePaths in the collection.
|
| bool | is_empty () const |
| | Returns true if there are no NodePaths in the collection, false otherwise.
|
| void | ls () const |
| | Lists all the nodes at and below each node in the collection hierarchically.
|
| void | ls (ostream &out, int indent_level=0) const |
| | Lists all the nodes at and below each node in the collection hierarchically.
|
|
| MAKE_SEQ (get_paths, get_num_paths, get_path) |
| NodePathCollection | operator+ (const NodePathCollection &other) const |
| | Returns a NodePathCollection representing the concatenation of the two lists.
|
| void | operator+= (const NodePathCollection &other) |
| | Appends the other list onto the end of this one.
|
|
void | operator= (const NodePathCollection ©) |
| NodePath | operator[] (int index) const |
| | Returns the nth NodePath in the collection.
|
| void | output (ostream &out) const |
| | Writes a brief one-line description of the NodePathCollection to the indicated output stream.
|
| void | remove_duplicate_paths () |
| | Removes any duplicate entries of the same NodePaths on this collection.
|
| bool | remove_path (const NodePath &node_path) |
| | Removes the indicated NodePath from the collection.
|
| void | remove_paths_from (const NodePathCollection &other) |
| | Removes from this collection all of the NodePaths listed in the other collection.
|
| void | reparent_to (const NodePath &other) |
| | Reparents all the NodePaths in the collection to the indicated node.
|
| void | set_attrib (const RenderAttrib *attrib, int priority=0) |
| | Applies the indicated RenderAttrib to all NodePaths in the collection.
|
| void | set_collide_mask (CollideMask new_mask, CollideMask bits_to_change=CollideMask::all_on(), TypeHandle node_type=TypeHandle::none()) |
| | Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level and below.
|
| void | set_color (PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0) |
| | Colors all NodePaths in the collection.
|
| void | set_color (const LColor &color, int priority=0) |
| | Colors all NodePaths in the collection.
|
| void | set_color_scale (PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0) |
| | Applies color scales to all NodePaths in the collection.
|
| void | set_color_scale (const LVecBase4 &scale, int priority=0) |
| | Applies color scales to all NodePaths in the collection.
|
| void | set_texture (Texture *tex, int priority=0) |
| | Adds the indicated texture to the list of textures that will be rendered on the default texture stage.
|
| void | set_texture (TextureStage *stage, Texture *tex, int priority=0) |
| | Adds the indicated texture to the list of textures that will be rendered on the indicated multitexture stage.
|
| void | set_texture_off (int priority=0) |
| | Sets the geometry at this level and below to render using no texture, on any stage.
|
| void | set_texture_off (TextureStage *stage, int priority=0) |
| | Sets the geometry at this level and below to render using no texture, on the indicated stage.
|
| void | show () |
| | Shows all NodePaths in the collection.
|
| int | size () const |
| | Returns the number of paths in the collection.
|
| void | stash () |
| | Stashes all NodePaths in the collection.
|
| void | unstash () |
| | Unstashes all NodePaths in the collection.
|
| void | write (ostream &out, int indent_level=0) const |
| | Writes a complete multi-line description of the NodePathCollection to the indicated output stream.
|
| void | wrt_reparent_to (const NodePath &other) |
| | Reparents all the NodePaths in the collection to the indicated node, adjusting each transform so as not to move in world coordinates.
|
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).
Definition at line 29 of file nodePathCollection.h.
Member Function Documentation
Applies color scales to all NodePaths in the collection.
The existing color scale, if any, is multiplied by the specified color scale.
Definition at line 112 of file nodePathCollection.I.
Appends the other list onto the end of this one.
This method duplicates the += operator; it is provided to satisfy Python's naming convention.
Definition at line 68 of file nodePathCollection.I.
References operator+=().
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().
Definition at line 480 of file nodePathCollection.cxx.
References NodePath::get_collide_mask(), get_num_paths(), and get_path().
Returns the number of NodePaths in the collection.
Definition at line 295 of file nodePathCollection.cxx.
Referenced by add_paths_from(), FindApproxLevelEntry::consider_node(), detach(), find_all_matches(), MeshDrawer::geometry(), get_collide_mask(), has_path(), hide(), ls(), output(), remove_duplicate_paths(), remove_paths_from(), reparent_to(), set_collide_mask(), PhysxConvexMeshDesc::set_from_node_path(), PhysxCcdSkeletonDesc::set_from_node_path(), PhysxTriangleMeshDesc::set_from_node_path(), PhysxClothMeshDesc::set_from_node_path(), show(), stash(), unstash(), write(), and wrt_reparent_to().
Returns the nth NodePath in the collection.
Definition at line 305 of file nodePathCollection.cxx.
Referenced by add_paths_from(), detach(), NodePath::find(), find_all_matches(), NodePath::find_path_to(), MeshDrawer::geometry(), get_collide_mask(), has_path(), hide(), ls(), remove_duplicate_paths(), remove_paths_from(), reparent_to(), set_collide_mask(), PhysxConvexMeshDesc::set_from_node_path(), PhysxCcdSkeletonDesc::set_from_node_path(), PhysxTriangleMeshDesc::set_from_node_path(), PhysxClothMeshDesc::set_from_node_path(), show(), stash(), unstash(), write(), and wrt_reparent_to().
Lists all the nodes at and below each node in the collection hierarchically.
Definition at line 79 of file nodePathCollection.I.
| NodePath NodePathCollection::operator[] |
( |
int |
index | ) |
const |
Removes the indicated NodePath from the collection.
Returns true if the path was removed, false if it was not a member of the collection.
Definition at line 159 of file nodePathCollection.cxx.
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.
Definition at line 502 of file nodePathCollection.cxx.
References get_num_paths(), get_path(), and NodePath::set_collide_mask().
Applies color scales to all NodePaths in the collection.
The existing color scale is replaced.
Definition at line 100 of file nodePathCollection.I.
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.
Definition at line 522 of file nodePathCollection.cxx.
References TextureStage::get_default().
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).
Definition at line 570 of file nodePathCollection.cxx.
References is_empty(), and set_attrib().
The documentation for this class was generated from the following files:
| | |