Panda3D
uvScrollNode.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file uvScrollNode.I
10  * @author zpavlov
11  * @date 2009-06-30
12  */
13 
14 /**
15  *
16  */
17 INLINE UvScrollNode::
18 UvScrollNode(const std::string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed) :
19  PandaNode(name),
20  _u_speed(u_speed),
21  _v_speed(v_speed),
22  _w_speed(w_speed),
23  _r_speed(r_speed),
24  _start_time(ClockObject::get_global_clock()->get_frame_time())
25 {
26  set_cull_callback();
27 }
28 
29 /**
30  *
31  */
32 INLINE UvScrollNode::
33 UvScrollNode(const std::string &name) :
34  PandaNode(name),
35  _u_speed(0),
36  _v_speed(0),
37  _w_speed(0),
38  _r_speed(0),
39  _start_time(ClockObject::get_global_clock()->get_frame_time())
40 {
41  set_cull_callback();
42 }
43 
44 
45 /**
46  *
47  */
48 INLINE void UvScrollNode::
49 set_u_speed(PN_stdfloat u_speed) {
50  _u_speed = u_speed;
51 }
52 
53 /**
54  *
55  */
56 INLINE void UvScrollNode::
57 set_v_speed(PN_stdfloat v_speed) {
58  _v_speed = v_speed;
59 }
60 
61 /**
62  *
63  */
64 INLINE void UvScrollNode::
65 set_w_speed(PN_stdfloat w_speed) {
66  _w_speed = w_speed;
67 }
68 
69 /**
70  *
71  */
72 INLINE void UvScrollNode::
73 set_r_speed(PN_stdfloat r_speed) {
74  _r_speed = r_speed;
75 }
76 
77 /**
78  *
79  */
80 INLINE PN_stdfloat UvScrollNode::
81 get_u_speed() const {
82  return _u_speed;
83 }
84 
85 /**
86  *
87  */
88 INLINE PN_stdfloat UvScrollNode::
89 get_v_speed() const {
90  return _v_speed;
91 }
92 
93 /**
94  *
95  */
96 INLINE PN_stdfloat UvScrollNode::
97 get_w_speed() const {
98  return _w_speed;
99 }
100 
101 /**
102  *
103  */
104 INLINE PN_stdfloat UvScrollNode::
105 get_r_speed() const {
106  return _r_speed;
107 }
108 
109 /**
110  *
111  */
112 INLINE UvScrollNode::
113 UvScrollNode(const UvScrollNode &copy) :
114  PandaNode(copy),
115  _u_speed(copy._u_speed),
116  _v_speed(copy._v_speed),
117  _w_speed(copy._w_speed),
118  _r_speed(copy._r_speed),
119  _start_time(copy._start_time)
120 {
121 }
A basic node of the scene graph or data graph.
Definition: pandaNode.h:64
A ClockObject keeps track of elapsed real time and discrete time.
Definition: clockObject.h:58
This node is placed at key points within the scene graph to animate uvs.
Definition: uvScrollNode.h:26