- 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:
43 int m_coreBoneId;
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//****************************************************************************//
CalCoreBone
Definition corebone.h:26
CalCoreKeyframe
The core keyframe class.
Definition corekeyframe.h:32
CalCoreTrack::create
bool create()
Creates the core track instance.
Definition coretrack.cpp:78
CalCoreTrack::m_coreBoneId
int m_coreBoneId
The index of the associated CoreBone in the CoreSkeleton.
Definition coretrack.h:43
CalCoreTrack::destroy
void destroy()
Destroys the core track instance.
Definition coretrack.cpp:90
CalCoreTrack::CalCoreTrack
CalCoreTrack()
Constructs the core track instance.
Definition coretrack.cpp:29
CalCoreTrack::getState
bool getState(float time, CalVector &translation, CalQuaternion &rotation)
Returns a specified state.
Definition coretrack.cpp:120
CalCoreTrack::getCoreBoneId
int getCoreBoneId()
Returns the ID of the core bone.
Definition coretrack.h:68
CalCoreTrack::m_keyframes
std::vector< CalCoreKeyframe * > m_keyframes
List of keyframes, always sorted by time.
Definition coretrack.h:46
CalQuaternion
The quaternion class.
Definition quaternion.h:36
CalVector
The vector class.
Definition vector.h:37

Generated by The Cal3D Team with Doxygen 1.15.0