scg3  0.6
Animation.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright 2014 Volker Ahlers
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */
24 
25 #ifndef ANIMATION_H_
26 #define ANIMATION_H_
27 
28 namespace scg {
29 
30 
34 class Animation {
35 
36 public:
37 
41  Animation();
42 
46  virtual ~Animation();
47 
51  bool isStarted() const;
52 
56  bool isRunning() const;
57 
65  virtual void start(double currTime);
66 
72  virtual void stop();
73 
79  virtual void reset();
80 
88  virtual void update(double currTime) = 0;
89 
90 protected:
91 
92  bool isStarted_;
93  bool isRunning_;
94  double lastTime_;
95  double diffTime_;
96  double totalTime_;
98 };
99 
100 
101 } /* namespace scg */
102 
103 #endif /* ANIMATION_H_ */
virtual ~Animation()
virtual void start(double currTime)
virtual void update(double currTime)=0
bool isRunning() const
bool isStarted_
Definition: Animation.h:92
double lastTime_
Definition: Animation.h:94
Base class for all animations (abstract), providing general functionality.
Definition: Animation.h:34
virtual void stop()
double diffTime_
Definition: Animation.h:95
virtual void reset()
Definition: Animation.h:28
bool isStarted() const
bool isRunning_
Definition: Animation.h:93
double totalTime_
Definition: Animation.h:96