- Cal3D 0.11 API Reference -

coretrack.h
1 //****************************************************************************//
2 // coretrack.h //
3 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4 //****************************************************************************//
5 // This library is free software; you can redistribute it and/or modify it //
6 // under the terms of the GNU Lesser General Public License as published by //
7 // the Free Software Foundation; either version 2.1 of the License, or (at //
8 // your option) any later version. //
9 //****************************************************************************//
10 
11 #ifndef CAL_CORETRACK_H
12 #define CAL_CORETRACK_H
13 
14 //****************************************************************************//
15 // Includes //
16 //****************************************************************************//
17 
18 #include "cal3d/global.h"
19 #include "cal3d/matrix.h"
20 #include "cal3d/vector.h"
21 #include "cal3d/quaternion.h"
22 
23 //****************************************************************************//
24 // Forward declarations //
25 //****************************************************************************//
26 
27 class CalCoreBone;
28 class CalCoreKeyframe;
29 
30 //****************************************************************************//
31 // Class declaration //
32 //****************************************************************************//
33 
34 //*****************************************************************************/
35 //** The core track class.
36 //*****************************************************************************/
37 
38 class CAL3D_API CalCoreTrack
39 {
40 // member variables
41 protected:
44 
46  std::vector<CalCoreKeyframe*> m_keyframes;
47 
48 // constructors/destructor
49 public:
50  CalCoreTrack();
51  virtual ~CalCoreTrack();
52 
53  bool create();
54  void destroy();
55 
56  bool getState(float time, CalVector& translation, CalQuaternion& rotation);
57 
58  /*****************************************************************************/
68  inline int getCoreBoneId()
69  {
70  return m_coreBoneId;
71  }
72 
73  bool setCoreBoneId(int coreBoneId);
74 
75  int getCoreKeyframeCount();
76  CalCoreKeyframe* getCoreKeyframe(int idx);
77 
78  bool addCoreKeyframe(CalCoreKeyframe *pCoreKeyframe);
79  void removeCoreKeyFrame(int _i) { m_keyframes.erase( m_keyframes.begin() + _i); }
80 
81  void scale(float factor);
82 
83 private:
84  std::vector<CalCoreKeyframe*>::iterator getUpperBound(float time);
85 };
86 
87 #endif
88 
89 //****************************************************************************//
int m_coreBoneId
The index of the associated CoreBone in the CoreSkeleton.
Definition: coretrack.h:43
int getCoreBoneId()
Returns the ID of the core bone.
Definition: coretrack.h:68
Definition: corebone.h:25
std::vector< CalCoreKeyframe * > m_keyframes
List of keyframes, always sorted by time.
Definition: coretrack.h:46
The vector class.
Definition: vector.h:36
Definition: coretrack.h:38
The core keyframe class.
Definition: corekeyframe.h:31
The quaternion class.
Definition: quaternion.h:35

Generated at Sat Aug 16 2014 01:39:52 by The Cal3D Team with Doxygen 1.8.7