nodePathCollection.I 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // Filename: nodePathCollection.I
  2. // Created by: drose (06Mar02)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. ////////////////////////////////////////////////////////////////////
  15. // Function: NodePathCollection::Destructor
  16. // Access: Published
  17. // Description:
  18. ////////////////////////////////////////////////////////////////////
  19. INLINE NodePathCollection::
  20. ~NodePathCollection() {
  21. }
  22. ////////////////////////////////////////////////////////////////////
  23. // Function: NodePathCollection::operator +=
  24. // Access: Published
  25. // Description: Appends the other list onto the end of this one.
  26. ////////////////////////////////////////////////////////////////////
  27. INLINE void NodePathCollection::
  28. operator += (const NodePathCollection &other) {
  29. add_paths_from(other);
  30. }
  31. ////////////////////////////////////////////////////////////////////
  32. // Function: NodePathCollection::operator +
  33. // Access: Published
  34. // Description: Returns a NodePathCollection representing the
  35. // concatenation of the two lists.
  36. ////////////////////////////////////////////////////////////////////
  37. INLINE NodePathCollection NodePathCollection::
  38. operator + (const NodePathCollection &other) const {
  39. NodePathCollection a(*this);
  40. a += other;
  41. return a;
  42. }
  43. ////////////////////////////////////////////////////////////////////
  44. // Function: NodePathCollection::ls
  45. // Access: Published
  46. // Description: Lists all the nodes at and below each node in the
  47. // collection hierarchically.
  48. ////////////////////////////////////////////////////////////////////
  49. INLINE void NodePathCollection::
  50. ls() const {
  51. ls(nout);
  52. }
  53. ////////////////////////////////////////////////////////////////////
  54. // Function: NodePathCollection::set_color
  55. // Access: Published
  56. // Description: Colors all NodePaths in the collection
  57. ////////////////////////////////////////////////////////////////////
  58. INLINE void NodePathCollection::
  59. set_color(float r, float g, float b, float a, int priority) {
  60. set_color(Colorf(r, g, b, a), priority);
  61. }
  62. ////////////////////////////////////////////////////////////////////
  63. // Function: NodePathCollection::set_color_scale
  64. // Access: Published
  65. // Description: Applies color scales to all NodePaths in the
  66. // collection. The existing color scale is replaced.
  67. ////////////////////////////////////////////////////////////////////
  68. INLINE void NodePathCollection::
  69. set_color_scale(float r, float g, float b, float a, int priority) {
  70. set_color_scale(LVecBase4f(r, g, b, a), priority);
  71. }
  72. ////////////////////////////////////////////////////////////////////
  73. // Function: NodePathCollection::compose_color_scale
  74. // Access: Published
  75. // Description: Applies color scales to all NodePaths in the
  76. // collection. The existing color scale, if any, is
  77. // multiplied by the specified color scale.
  78. ////////////////////////////////////////////////////////////////////
  79. INLINE void NodePathCollection::
  80. compose_color_scale(float r, float g, float b, float a, int priority) {
  81. compose_color_scale(LVecBase4f(r, g, b, a), priority);
  82. }