Panda3D
|
00001 // Filename: nodePathCollection.I 00002 // Created by: drose (06Mar02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: NodePathCollection::Destructor 00018 // Access: Published 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE NodePathCollection:: 00022 ~NodePathCollection() { 00023 } 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Function: NodePathCollection::operator += 00027 // Access: Published 00028 // Description: Appends the other list onto the end of this one. 00029 //////////////////////////////////////////////////////////////////// 00030 INLINE void NodePathCollection:: 00031 operator += (const NodePathCollection &other) { 00032 add_paths_from(other); 00033 } 00034 00035 //////////////////////////////////////////////////////////////////// 00036 // Function: NodePathCollection::operator + 00037 // Access: Published 00038 // Description: Returns a NodePathCollection representing the 00039 // concatenation of the two lists. 00040 //////////////////////////////////////////////////////////////////// 00041 INLINE NodePathCollection NodePathCollection:: 00042 operator + (const NodePathCollection &other) const { 00043 NodePathCollection a(*this); 00044 a += other; 00045 return a; 00046 } 00047 00048 //////////////////////////////////////////////////////////////////// 00049 // Function: NodePathCollection::append 00050 // Access: Published 00051 // Description: Adds a new NodePath to the collection. This method 00052 // duplicates the add_path() method; it is provided to 00053 // satisfy Python's naming convention. 00054 //////////////////////////////////////////////////////////////////// 00055 void NodePathCollection:: 00056 append(const NodePath &node_path) { 00057 add_path(node_path); 00058 } 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // Function: NodePathCollection::extend 00062 // Access: Published 00063 // Description: Appends the other list onto the end of this one. 00064 // This method duplicates the += operator; it is 00065 // provided to satisfy Python's naming convention. 00066 //////////////////////////////////////////////////////////////////// 00067 INLINE void NodePathCollection:: 00068 extend(const NodePathCollection &other) { 00069 operator += (other); 00070 } 00071 00072 //////////////////////////////////////////////////////////////////// 00073 // Function: NodePathCollection::ls 00074 // Access: Published 00075 // Description: Lists all the nodes at and below each node in the 00076 // collection hierarchically. 00077 //////////////////////////////////////////////////////////////////// 00078 INLINE void NodePathCollection:: 00079 ls() const { 00080 ls(nout); 00081 } 00082 00083 //////////////////////////////////////////////////////////////////// 00084 // Function: NodePathCollection::set_color 00085 // Access: Published 00086 // Description: Colors all NodePaths in the collection 00087 //////////////////////////////////////////////////////////////////// 00088 INLINE void NodePathCollection:: 00089 set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a, int priority) { 00090 set_color(LColor(r, g, b, a), priority); 00091 } 00092 00093 //////////////////////////////////////////////////////////////////// 00094 // Function: NodePathCollection::set_color_scale 00095 // Access: Published 00096 // Description: Applies color scales to all NodePaths in the 00097 // collection. The existing color scale is replaced. 00098 //////////////////////////////////////////////////////////////////// 00099 INLINE void NodePathCollection:: 00100 set_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a, int priority) { 00101 set_color_scale(LVecBase4(r, g, b, a), priority); 00102 } 00103 00104 //////////////////////////////////////////////////////////////////// 00105 // Function: NodePathCollection::compose_color_scale 00106 // Access: Published 00107 // Description: Applies color scales to all NodePaths in the 00108 // collection. The existing color scale, if any, is 00109 // multiplied by the specified color scale. 00110 //////////////////////////////////////////////////////////////////// 00111 INLINE void NodePathCollection:: 00112 compose_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a, int priority) { 00113 compose_color_scale(LVecBase4(r, g, b, a), priority); 00114 }