-
Notifications
You must be signed in to change notification settings - Fork 0
/
CModelController.h
executable file
·59 lines (43 loc) · 1.19 KB
/
CModelController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
CModelController.h
Author: Tom Naughton
Description: <describe the CModelController class here>
*/
#ifndef CModelController_H
#define CModelController_H
#include "CModelInstance.h"
#include "CAnimationQueue.h"
class Sequence
{
public:
string name;
UInt32 startIndex;
UInt32 endIndex;
};
class CModelController
{
public:
CModelController(CModelInstance *inModel);
virtual ~CModelController();
virtual void Reset();
virtual Boolean init();
virtual Boolean Animate();
virtual void Draw(renderingAttributes_t *renderingAttributes);
virtual Boolean HandleKeyPress(const EventRecord& inKeyEvent);
virtual int animationIndexForKeyEvent(const EventRecord &inKeyEvent);
virtual const char *DisplayString();
virtual void StartSequenceAtIndex(int index);
virtual void appendAnimationNames(StringList *result);
virtual int animationCount();
protected:
void NextFrame(Sequence *sequence);
void BeginSequence(Sequence *sequence);
CModelInstance *_model;
Boolean _animating;
Boolean _needsRedraw;
Sequence* _animationSequence;
CAnimationQueue _animationQueue;
float _theTime;
vector<Sequence*> *_animations;
};
#endif // CModelController_H