- Cal3D 0.11 API Reference -

animation.h
1//****************************************************************************//
2// animation.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_ANIMATION_H
12#define CAL_ANIMATION_H
13
14
15#include "cal3d/global.h"
16
17
19class CalModel;
20
21class CAL3D_API CalAnimation
22{
23public:
24 enum Type
25 {
26 TYPE_NONE = 0,
27 TYPE_CYCLE,
28 TYPE_POSE,
29 TYPE_ACTION
30 };
31
32 enum State
33 {
34 STATE_NONE = 0,
35 STATE_SYNC,
36 STATE_ASYNC,
37 STATE_IN,
38 STATE_STEADY,
39 STATE_OUT,
40 STATE_STOPPED
41 };
42
43protected:
44 CalAnimation(CalCoreAnimation* pCoreAnimation);
45public:
46 virtual ~CalAnimation() { }
47
48 CalCoreAnimation *getCoreAnimation();
49 State getState();
50 float getTime();
51 Type getType();
52 float getWeight();
53 void setTime(float time);
54 void setTimeFactor(float timeFactor);
55 float getTimeFactor();
56
57 void checkCallbacks(float animationTime,CalModel *model);
58 void completeCallbacks(CalModel *model);
59
60protected:
61 void setType(Type type) {
62 m_type = type;
63 }
64
65 void setState(State state) {
66 m_state = state;
67 }
68
69 void setWeight(float weight) {
70 m_weight = weight;
71 }
72
73
74private:
75
76 CalCoreAnimation *m_pCoreAnimation;
77 std::vector<float> m_lastCallbackTimes;
78 Type m_type;
79 State m_state;
80 float m_time;
81 float m_timeFactor;
82 float m_weight;
83};
84
85#endif
86
87//****************************************************************************//
Definition animation.h:22
Definition coreanimation.h:23
Definition model.h:31

Generated by The Cal3D Team with Doxygen 1.12.0