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

RotationTimeTrack.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_ROTATIONTIMETRACK_H 00012 #define OPENCAL_ROTATIONTIMETRACK_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 #include <OpenCAL/TimeTrack.h> 00017 00018 #include <OpenCAL/Quaternion.h> 00019 using OpenCAL::Utils::Quaternion; 00020 00021 #include <map> 00022 using std::map; 00023 00024 00025 namespace OpenCAL 00026 { 00027 // Forward declarations 00028 namespace Utils { class Vector3; } 00029 using Utils::Vector3; 00030 00036 class OPENCAL_API RotationTimeTrack: public TimeTrack 00037 { 00038 protected: 00039 // Typedefs 00040 typedef map<float, Quaternion> KeyFrameMap; 00041 00042 // Member variables 00043 Quaternion *m_rotation; 00044 KeyFrameMap m_keyFrames; 00045 00046 public: 00047 // Constructors and destructor 00048 RotationTimeTrack(KeyFrameSystem *keyFrameSystem, Quaternion *rotation); 00049 virtual ~RotationTimeTrack(); 00050 00051 // Other functions 00052 void addKeyFrame(float time, const Quaternion &value); 00053 void addKeyFrame(float time, const Vector3 &axis, float angle) 00054 { addKeyFrame(time, Quaternion::createFromAxisAngle(axis, angle)); } 00055 void deleteKeyFrame(float time); 00056 void apply(); 00057 }; 00058 } 00059 00060 #endif // OPENCAL_ROTATIONTIMETRACK_H

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