Panda3D
Loading...
Searching...
No Matches
nodePathCollection.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file nodePathCollection.I
10 * @author drose
11 * @date 2002-03-06
12 */
13
14/**
15 * Appends the other list onto the end of this one.
16 */
18operator += (const NodePathCollection &other) {
19 add_paths_from(other);
20}
21
22/**
23 * Returns a NodePathCollection representing the concatenation of the two
24 * lists.
25 */
27operator + (const NodePathCollection &other) const {
28 NodePathCollection a(*this);
29 a += other;
30 return a;
31}
32
33/**
34 * Adds a new NodePath to the collection. This method duplicates the
35 * add_path() method; it is provided to satisfy Python's naming convention.
36 */
38append(const NodePath &node_path) {
39 add_path(node_path);
40}
41
42/**
43 * Appends the other list onto the end of this one. This method duplicates
44 * the += operator; it is provided to satisfy Python's naming convention.
45 */
47extend(const NodePathCollection &other) {
48 operator += (other);
49}
50
51/**
52 * Lists all the nodes at and below each node in the collection
53 * hierarchically.
54 */
56ls() const {
57 ls(nout);
58}
59
60/**
61 * Colors all NodePaths in the collection
62 */
64set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a, int priority) {
65 set_color(LColor(r, g, b, a), priority);
66}
67
68/**
69 * Applies color scales to all NodePaths in the collection. The existing
70 * color scale is replaced.
71 */
73set_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a, int priority) {
74 set_color_scale(LVecBase4(r, g, b, a), priority);
75}
76
77/**
78 * Applies color scales to all NodePaths in the collection. The existing
79 * color scale, if any, is multiplied by the specified color scale.
80 */
82compose_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a, int priority) {
83 compose_color_scale(LVecBase4(r, g, b, a), priority);
84}
This is a set of zero or more NodePaths.
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 add_path(const NodePath &node_path)
Adds a new NodePath to the collection.
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 add_paths_from(const NodePathCollection &other)
Adds all the NodePaths indicated in the other collection to this path.
void extend(const NodePathCollection &other)
Appends the other list onto the end of this one.
void ls() const
Lists all the nodes at and below each node in the collection hierarchically.
void append(const NodePath &node_path)
Adds a new NodePath to the collection.
void operator+=(const NodePathCollection &other)
Appends the other list onto the end of this one.
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.
NodePathCollection operator+(const NodePathCollection &other) const
Returns a NodePathCollection representing the concatenation of the two lists.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition nodePath.h:159