- Cal3D 0.11 API Reference -

coreanimation.h
1//****************************************************************************//
2// coreanimation.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_COREANIMATION_H
12#define CAL_COREANIMATION_H
13
14#include "cal3d/global.h"
15#include "cal3d/quaternion.h"
16#include "cal3d/refcounted.h"
17#include "cal3d/refptr.h"
18
19 struct CalAnimationCallback;
20 class CalCoreTrack;
21
22 class CAL3D_API CalCoreAnimation : public cal3d::RefCounted
23{
24 protected:
25 ~CalCoreAnimation();
26
27 public:
28 CalCoreAnimation();
29
30 bool addCoreTrack(CalCoreTrack *pCoreTrack);
31 CalCoreTrack *getCoreTrack(int coreBoneId);
32
33 float getDuration() const;
34 void setDuration(float duration);
35 void scale(float factor);
36 void setFilename(const std::string& filename);
37 const std::string& getFilename(void) const;
38 void setName(const std::string& name);
39 const std::string& getName(void) const;
40
41 void registerCallback(CalAnimationCallback *callback,float min_interval);
42 void removeCallback(CalAnimationCallback *callback);
43
44 unsigned int getTrackCount() const;
45 std::list<CalCoreTrack *>& getListCoreTrack();
46 unsigned int getTotalNumberOfKeyframes() const;
47
48 struct CallbackRecord
49 {
50 CalAnimationCallback *callback;
51 float min_interval;
52 };
53
54 std::vector<CallbackRecord>& getCallbackList() { return m_listCallbacks; }
55
56 private:
57
58 std::vector<CallbackRecord> m_listCallbacks;
59
60 float m_duration;
61 std::list<CalCoreTrack *> m_listCoreTrack;
62 std::string m_name;
63 std::string m_filename;
64};
65
66 typedef cal3d::RefPtr<CalCoreAnimation> CalCoreAnimationPtr;
67
68#endif
69
70//****************************************************************************//
CalCoreAnimation::removeCallback
void removeCallback(CalAnimationCallback *callback)
Remove a callback from the current list of callbacks for this Anim.
Definition coreanimation.cpp:216
CalCoreAnimation::getCoreTrack
CalCoreTrack * getCoreTrack(int coreBoneId)
Provides access to a core track.
Definition coreanimation.cpp:59
CalCoreAnimation::setName
void setName(const std::string &name)
Set the symbolic name of the core animation.
Definition coreanimation.cpp:169
CalCoreAnimation::getTotalNumberOfKeyframes
unsigned int getTotalNumberOfKeyframes() const
Returns the total number of core keyframes used for this animation.
Definition coreanimation.cpp:251
CalCoreAnimation::registerCallback
void registerCallback(CalAnimationCallback *callback, float min_interval)
Add a callback to the current list of callbacks for this CoreAnim.
Definition coreanimation.cpp:198
CalCoreAnimation::addCoreTrack
bool addCoreTrack(CalCoreTrack *pCoreTrack)
Adds a core track.
Definition coreanimation.cpp:39
CalCoreAnimation::setDuration
void setDuration(float duration)
Sets the duration.
Definition coreanimation.cpp:111
CalCoreAnimation::getFilename
const std::string & getFilename(void) const
Get the name of the file in which the core animation is stored, if any.
Definition coreanimation.cpp:157
CalCoreAnimation::getDuration
float getDuration() const
Returns the duration.
Definition coreanimation.cpp:98
CalCoreAnimation::scale
void scale(float factor)
Scale the core animation.
Definition coreanimation.cpp:125
CalCoreAnimation::getTrackCount
unsigned int getTrackCount() const
Gets the number of core tracks for this core animation.
Definition coreanimation.cpp:85
CalCoreAnimation::setFilename
void setFilename(const std::string &filename)
Set the name of the file in which the core animation is stored, if any.
Definition coreanimation.cpp:142
CalCoreAnimation::getName
const std::string & getName(void) const
Get the symbolic name the core animation.
Definition coreanimation.cpp:184
CalCoreAnimation::getListCoreTrack
std::list< CalCoreTrack * > & getListCoreTrack()
Returns the core track list.
Definition coreanimation.cpp:237
CalCoreTrack
Definition coretrack.h:39
cal3d::RefCounted
Derive from RefCounted to make your class have reference-counted lifetime semantics.
Definition refcounted.h:29
cal3d::RefPtr
A container-safe smart pointer used for refcounted classes.
Definition refptr.h:11
CalAnimationCallback
Definition animcallback.h:21
CalCoreAnimation::CallbackRecord
Definition coreanimation.h:49

Generated by The Cal3D Team with Doxygen 1.15.0