- Cal3D 0.11 API Reference -

coremorphtrack.h
1//****************************************************************************//
2// coreMorphTrack.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_COREMORPHTRACK_H
12#define CAL_COREMORPHTRACK_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#include "cal3d/coremorphkeyframe.h"
23
24//****************************************************************************//
25// Forward declarations //
26//****************************************************************************//
27
29
30//****************************************************************************//
31// Class declaration //
32//****************************************************************************//
33
34//*****************************************************************************/
35//** The core track class.
36//*****************************************************************************/
37
38class CAL3D_API CalCoreMorphTrack
39{
40// member variables
41protected:
42
43 std::string m_morphName;
44
46 std::vector<CalCoreMorphKeyframe> m_keyframes;
47 std::vector<CalCoreMorphKeyframe*> m_keyframesToDelete;
48
49// constructors/destructor
50public:
52 virtual ~CalCoreMorphTrack();
53
54 bool create();
55 void destroy();
56
57 bool getState(float time, float & weightOut);
58
59 std::string getMorphName() const;
60 void setMorphName(std::string name);
61
62 int getCoreMorphKeyframeCount() const;
63 void reserve(int);
64
65 CalCoreMorphKeyframe* getCoreMorphKeyframe(int idx);
66 const CalCoreMorphKeyframe* getCoreMorphKeyframe(int idx) const;
67
68 bool addCoreMorphKeyframe(CalCoreMorphKeyframe *pCoreKeyframe);
69
70 const std::vector<CalCoreMorphKeyframe> & getVectorCoreMorphKeyframes() const;
71 std::vector<CalCoreMorphKeyframe> & getVectorCoreMorphKeyframes();
72
73 void scale(float factor);
74
75private:
76 std::vector<CalCoreMorphKeyframe>::iterator getUpperBound(float time);
77};
78
79#endif
80
81//****************************************************************************//
The core keyframe class.
Definition coremorphkeyframe.h:32
Definition coremorphtrack.h:39
std::vector< CalCoreMorphKeyframe > m_keyframes
List of keyframes, always sorted by time.
Definition coremorphtrack.h:46

Generated by The Cal3D Team with Doxygen 1.12.0