- 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
27class CalCoreBone;
28class CalCoreKeyframe;
29
30//****************************************************************************//
31// Class declaration //
32//****************************************************************************//
33
34//*****************************************************************************/
35//** The core track class.
36//*****************************************************************************/
37
38class CAL3D_API CalCoreTrack
39{
40// member variables
41protected:
44
46 std::vector<CalCoreKeyframe*> m_keyframes;
47
48// constructors/destructor
49public:
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
83private:
84 std::vector<CalCoreKeyframe*>::iterator getUpperBound(float time);
85};
86
87#endif
88
89//****************************************************************************//
Definition corebone.h:26
The core keyframe class.
Definition corekeyframe.h:32
Definition coretrack.h:39
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
std::vector< CalCoreKeyframe * > m_keyframes
List of keyframes, always sorted by time.
Definition coretrack.h:46
The quaternion class.
Definition quaternion.h:36
The vector class.
Definition vector.h:37

Generated by The Cal3D Team with Doxygen 1.9.8