- 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
20class CalCoreTrack;
21class CalCoreSkeleton;
22
23class CAL3D_API CalCoreAnimation : public cal3d::RefCounted
24{
25protected:
26 ~CalCoreAnimation();
27
28public:
29 CalCoreAnimation();
30
31 size_t size();
32 void fillInvalidTranslations( CalCoreSkeleton * skel );
33 bool addCoreTrack(CalCoreTrack *pCoreTrack);
34 CalCoreTrack *getCoreTrack(int coreBoneId);
35 CalCoreTrack * nthCoreTrack( unsigned int );
36 float getDuration() const;
37 void setDuration(float duration);
38 void scale(float factor);
39 static int getNumCoreAnimations();
40 void setFilename(const std::string& filename);
41 const std::string& getFilename(void) const;
42 void setName(const std::string& name);
43 const std::string& getName(void) const;
44
45 void registerCallback(CalAnimationCallback *callback, float min_interval);
47
48 unsigned int getTrackCount() const;
49 std::list<CalCoreTrack *>& getListCoreTrack();
50 unsigned int getTotalNumberOfKeyframes() const;
51
53 {
54 CalAnimationCallback *callback;
55 float min_interval;
56 };
57
58 std::vector<CallbackRecord>& getCallbackList() { return m_listCallbacks; }
59
60private:
61
62 std::vector<CallbackRecord> m_listCallbacks;
63
64 float m_duration;
65 std::list<CalCoreTrack *> m_listCoreTrack;
66 std::string m_name;
67 std::string m_filename;
68};
69
70typedef cal3d::RefPtr<CalCoreAnimation> CalCoreAnimationPtr;
71
72#endif
73
74//****************************************************************************//
void removeCallback(CalAnimationCallback *callback)
Remove a callback from the current list of callbacks for this Anim.
Definition coreanimation.cpp:276
CalCoreTrack * getCoreTrack(int coreBoneId)
Provides access to a core track.
Definition coreanimation.cpp:85
void setName(const std::string &name)
Set the symbolic name of the core animation.
Definition coreanimation.cpp:229
unsigned int getTotalNumberOfKeyframes() const
Returns the total number of core keyframes used for this animation.
Definition coreanimation.cpp:311
void registerCallback(CalAnimationCallback *callback, float min_interval)
Add a callback to the current list of callbacks for this CoreAnim.
Definition coreanimation.cpp:258
bool addCoreTrack(CalCoreTrack *pCoreTrack)
Adds a core track.
Definition coreanimation.cpp:53
void setDuration(float duration)
Sets the duration.
Definition coreanimation.cpp:171
const std::string & getFilename(void) const
Get the name of the file in which the core animation is stored, if any.
Definition coreanimation.cpp:217
float getDuration() const
Returns the duration.
Definition coreanimation.cpp:158
void scale(float factor)
Scale the core animation.
Definition coreanimation.cpp:185
unsigned int getTrackCount() const
Gets the number of core tracks for this core animation.
Definition coreanimation.cpp:145
void setFilename(const std::string &filename)
Set the name of the file in which the core animation is stored, if any.
Definition coreanimation.cpp:202
const std::string & getName(void) const
Get the symbolic name the core animation.
Definition coreanimation.cpp:244
std::list< CalCoreTrack * > & getListCoreTrack()
Returns the core track list.
Definition coreanimation.cpp:297
Definition coreskeleton.h:25
Definition coretrack.h:27
Derive from RefCounted to make your class have reference-counted lifetime semantics.
Definition refcounted.h:29
A container-safe smart pointer used for refcounted classes.
Definition refptr.h:11
Definition animcallback.h:21
Definition coreanimation.h:53

Generated by The Cal3D Team with Doxygen 1.13.2