texProjectorEffect.I 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Filename: texProjectorEffect.I
  2. // Created by: drose (25Jul04)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. ////////////////////////////////////////////////////////////////////
  19. // Function: TexProjectorEffect::Constructor
  20. // Access: Protected
  21. // Description: Use TexProjectorEffect::make() to construct a new
  22. // TexProjectorEffect object.
  23. ////////////////////////////////////////////////////////////////////
  24. INLINE TexProjectorEffect::
  25. TexProjectorEffect() {
  26. }
  27. ////////////////////////////////////////////////////////////////////
  28. // Function: TexProjectorEffect::Copy Constructor
  29. // Access: Protected
  30. // Description: Use TexProjectorEffect::make() to construct a new
  31. // TexProjectorEffect object.
  32. ////////////////////////////////////////////////////////////////////
  33. INLINE TexProjectorEffect::
  34. TexProjectorEffect(const TexProjectorEffect &copy) :
  35. _stages(copy._stages)
  36. {
  37. }
  38. ////////////////////////////////////////////////////////////////////
  39. // Function: TexProjectorEffect::StageDef::Constructor
  40. // Access: Public
  41. // Description:
  42. ////////////////////////////////////////////////////////////////////
  43. INLINE TexProjectorEffect::StageDef::
  44. StageDef() :
  45. _to_lens_node(NULL)
  46. {
  47. }
  48. ////////////////////////////////////////////////////////////////////
  49. // Function: TexProjectorEffect::StageDef::set_from
  50. // Access: Public
  51. // Description:
  52. ////////////////////////////////////////////////////////////////////
  53. INLINE void TexProjectorEffect::StageDef::
  54. set_from(const NodePath &from) {
  55. _from = from;
  56. }
  57. ////////////////////////////////////////////////////////////////////
  58. // Function: TexProjectorEffect::StageDef::compare_to
  59. // Access: Public
  60. // Description:
  61. ////////////////////////////////////////////////////////////////////
  62. INLINE int TexProjectorEffect::StageDef::
  63. compare_to(const TexProjectorEffect::StageDef &other) const {
  64. int compare = _to.compare_to(other._to);
  65. if (compare != 0) {
  66. return compare;
  67. }
  68. return _from.compare_to(other._from);
  69. }