Panda3D
uvScrollNode.I
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: UvScrollNode::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE UvScrollNode::
22 UvScrollNode(const string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed) :
23  PandaNode(name),
24  _u_speed(u_speed),
25  _v_speed(v_speed),
26  _w_speed(w_speed),
27  _r_speed(r_speed),
28  _start_time(ClockObject::get_global_clock()->get_frame_time())
29 {
30  set_cull_callback();
31 }
32 
33 ////////////////////////////////////////////////////////////////////
34 // Function: UvScrollNode::Constructor
35 // Access: Public
36 // Description:
37 ////////////////////////////////////////////////////////////////////
38 INLINE UvScrollNode::
39 UvScrollNode(const string &name) :
40  PandaNode(name),
41  _u_speed(0),
42  _v_speed(0),
43  _w_speed(0),
44  _r_speed(0),
45  _start_time(ClockObject::get_global_clock()->get_frame_time())
46 {
47  set_cull_callback();
48 }
49 
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: UvScrollNode::set_u_speed
53 // Access: Published
54 // Description:
55 ////////////////////////////////////////////////////////////////////
56 INLINE void UvScrollNode::
57 set_u_speed(PN_stdfloat u_speed) {
58  _u_speed = u_speed;
59 }
60 
61 ////////////////////////////////////////////////////////////////////
62 // Function: UvScrollNode::set_v_speed
63 // Access: Published
64 // Description:
65 ////////////////////////////////////////////////////////////////////
66 INLINE void UvScrollNode::
67 set_v_speed(PN_stdfloat v_speed) {
68  _v_speed = v_speed;
69 }
70 
71 ////////////////////////////////////////////////////////////////////
72 // Function: UvScrollNode::set_w_speed
73 // Access: Published
74 // Description:
75 ////////////////////////////////////////////////////////////////////
76 INLINE void UvScrollNode::
77 set_w_speed(PN_stdfloat w_speed) {
78  _w_speed = w_speed;
79 }
80 
81 ////////////////////////////////////////////////////////////////////
82 // Function: UvScrollNode::set_r_speed
83 // Access: Published
84 // Description:
85 ////////////////////////////////////////////////////////////////////
86 INLINE void UvScrollNode::
87 set_r_speed(PN_stdfloat r_speed) {
88  _r_speed = r_speed;
89 }
90 
91 ////////////////////////////////////////////////////////////////////
92 // Function: UvSctrollNode::get_u_speed
93 // Access: Published
94 // Description:
95 ////////////////////////////////////////////////////////////////////
96 INLINE PN_stdfloat UvScrollNode::
97 get_u_speed() const {
98  return _u_speed;
99 }
100 
101 ////////////////////////////////////////////////////////////////////
102 // Function: UvScrollNode::get_v_speed
103 // Access: Published
104 // Description:
105 ////////////////////////////////////////////////////////////////////
106 INLINE PN_stdfloat UvScrollNode::
107 get_v_speed() const {
108  return _v_speed;
109 }
110 
111 ////////////////////////////////////////////////////////////////////
112 // Function: UvScrollNode::get_w_speed
113 // Access: Published
114 // Description:
115 ////////////////////////////////////////////////////////////////////
116 INLINE PN_stdfloat UvScrollNode::
117 get_w_speed() const {
118  return _w_speed;
119 }
120 
121 ////////////////////////////////////////////////////////////////////
122 // Function: UvSctrollNode::get_r_speed
123 // Access: Published
124 // Description:
125 ////////////////////////////////////////////////////////////////////
126 INLINE PN_stdfloat UvScrollNode::
127 get_r_speed() const {
128  return _r_speed;
129 }
130 
131 ////////////////////////////////////////////////////////////////////
132 // Function: UvScrollNode::Copy Constructor
133 // Access: Protected
134 // Description:
135 ////////////////////////////////////////////////////////////////////
136 INLINE UvScrollNode::
137 UvScrollNode(const UvScrollNode &copy) :
138  PandaNode(copy),
139  _u_speed(copy._u_speed),
140  _v_speed(copy._v_speed),
141  _w_speed(copy._w_speed),
142  _r_speed(copy._r_speed),
143  _start_time(copy._start_time)
144 {
145 }
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
A ClockObject keeps track of elapsed real time and discrete time.
Definition: clockObject.h:66
This node is placed at key points within the scene graph to animate uvs.
Definition: uvScrollNode.h:29