Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

KeyFrameSystem.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_KEYFRAMESYSTEM_H 00012 #define OPENCAL_KEYFRAMESYSTEM_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 #include <OpenCAL/Actor.h> 00017 00018 #include <vector> 00019 using std::vector; 00020 00021 00022 namespace OpenCAL 00023 { 00024 // Forward declarations 00025 class TimeTrack; 00026 00031 class OPENCAL_API KeyFrameSystem: public Actor 00032 { 00033 private: 00034 bool m_destructing; 00035 00036 protected: 00037 // Typedefs 00038 typedef vector<TimeTrack *> TimeTrackList; 00039 00040 // Member variables 00041 float m_currentTime; 00042 bool m_loop, m_stopped; 00043 TimeTrackList m_timeTracks; 00044 00045 public: 00046 // Constructors and destructor 00047 KeyFrameSystem(System *parent); 00048 virtual ~KeyFrameSystem(); 00049 00050 // Get functions 00051 float getCurrentTime() const { return m_currentTime; } 00052 bool isLooping() const { return m_loop; } 00053 bool isStopped() const { return m_stopped; } 00054 00055 // Set functions 00056 00057 // Time stepping functions 00058 virtual void execute(float deltaSeconds); 00059 void rewind(); 00060 void setTime(float time); 00061 00062 00063 protected: 00064 // Protected functions 00065 void addTimeTrack(TimeTrack *track) { m_timeTracks.push_back(track); } 00066 void deleteTimeTrack(TimeTrack *track); 00067 00068 friend class TimeTrack; 00069 }; 00070 } 00071 00072 #endif // OPENCAL_KEYFRAMESYSTEM_H

Generated on Sun Aug 15 19:19:22 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8