uvScrollNode.I 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. // Filename: uvScrollNode.I
  2. // Created by: zpavlov (30june09)
  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: UvScrollNode::Constructor
  16. // Access: Public
  17. // Description:
  18. ////////////////////////////////////////////////////////////////////
  19. INLINE UvScrollNode::
  20. UvScrollNode(const string &name, float u_speed, float v_speed, float r_speed) :
  21. PandaNode(name),
  22. _start_time(ClockObject::get_global_clock()->get_frame_time()),
  23. _u_speed(u_speed),
  24. _v_speed(v_speed),
  25. _r_speed(r_speed)
  26. {
  27. set_cull_callback();
  28. }
  29. ////////////////////////////////////////////////////////////////////
  30. // Function: UvScrollNode::Constructor
  31. // Access: Public
  32. // Description:
  33. ////////////////////////////////////////////////////////////////////
  34. INLINE UvScrollNode::
  35. UvScrollNode(const string &name) :
  36. PandaNode(name),
  37. _start_time(ClockObject::get_global_clock()->get_frame_time()),
  38. _u_speed(0),
  39. _v_speed(0),
  40. _r_speed(0)
  41. {
  42. set_cull_callback();
  43. }
  44. ////////////////////////////////////////////////////////////////////
  45. // Function: UvSctrollNode::set_u_speed
  46. // Access: Published
  47. // Description:
  48. ////////////////////////////////////////////////////////////////////
  49. INLINE void UvScrollNode::
  50. set_u_speed(float u_speed) {
  51. _u_speed = u_speed;
  52. }
  53. ////////////////////////////////////////////////////////////////////
  54. // Function: UvSctrollNode::set_v_speed
  55. // Access: Published
  56. // Description:
  57. ////////////////////////////////////////////////////////////////////
  58. INLINE void UvScrollNode::
  59. set_v_speed(float v_speed) {
  60. _v_speed = v_speed;
  61. }
  62. ////////////////////////////////////////////////////////////////////
  63. // Function: UvSctrollNode::set_r_speed
  64. // Access: Published
  65. // Description:
  66. ////////////////////////////////////////////////////////////////////
  67. INLINE void UvScrollNode::
  68. set_r_speed(float r_speed) {
  69. _r_speed = r_speed;
  70. }
  71. ////////////////////////////////////////////////////////////////////
  72. // Function: UvSctrollNode::get_u_speed
  73. // Access: Published
  74. // Description:
  75. ////////////////////////////////////////////////////////////////////
  76. INLINE float UvScrollNode::
  77. get_u_speed() const {
  78. return _u_speed;
  79. }
  80. ////////////////////////////////////////////////////////////////////
  81. // Function: UvSctrollNode::get_v_speed
  82. // Access: Published
  83. // Description:
  84. ////////////////////////////////////////////////////////////////////
  85. INLINE float UvScrollNode::
  86. get_v_speed() const {
  87. return _v_speed;
  88. }
  89. ////////////////////////////////////////////////////////////////////
  90. // Function: UvSctrollNode::get_r_speed
  91. // Access: Published
  92. // Description:
  93. ////////////////////////////////////////////////////////////////////
  94. INLINE float UvScrollNode::
  95. get_r_speed() const {
  96. return _r_speed;
  97. }
  98. ////////////////////////////////////////////////////////////////////
  99. // Function: UvScrollNode::Copy Constructor
  100. // Access: Protected
  101. // Description:
  102. ////////////////////////////////////////////////////////////////////
  103. INLINE UvScrollNode::
  104. UvScrollNode(const UvScrollNode &copy) :
  105. PandaNode(copy),
  106. _u_speed(copy._u_speed),
  107. _v_speed(copy._v_speed),
  108. _r_speed(copy._r_speed),
  109. _start_time(copy._start_time)
  110. {
  111. }