- Cal3D 0.11 API Reference -

saver.h
1//****************************************************************************//
2// saver.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_SAVER_H
12#define CAL_SAVER_H
13
14//****************************************************************************//
15// Includes //
16//****************************************************************************//
17
18#include "cal3d/global.h"
19#include "cal3d/vector.h"
20
21//****************************************************************************//
22// Forward declarations //
23//****************************************************************************//
24
25class CalCoreModel;
26class CalCoreSkeleton;
27class CalCoreBone;
30class CalCoreMesh;
31class CalCoreSubmesh;
32class CalCoreMaterial;
33class CalCoreKeyframe;
36class CalCoreTrack;
37
38//****************************************************************************//
39// Class declaration //
40//****************************************************************************//
41
42 /*****************************************************************************/
47public:
48 bool bCompressKeyframes;
49
50protected:
51 CalVector keyframe_min;
52 CalVector keyframe_scale;
53 float duration;
54
55 friend class CalSaver;
56};
57
58class CAL3D_API CalSaver
59{
60public:
61 static bool saveCoreAnimation(const std::string& strFilename, CalCoreAnimation *pCoreAnimation, CalSaverAnimationOptions *pOptions = NULL);
62 static bool saveCoreAnimatedMorph(const std::string& strFilename, CalCoreAnimatedMorph *pCoreAnimatedMorph);
63 static bool saveCoreMaterial(const std::string& strFilename, CalCoreMaterial *pCoreMaterial);
64 static bool saveCoreMesh(const std::string& strFilename, CalCoreMesh *pCoreMesh);
65 static bool saveCoreSkeleton(const std::string& strFilename, CalCoreSkeleton *pCoreSkeleton);
66
67protected:
68 static bool saveCoreBones(std::ofstream& file, const std::string& strFilename, CalCoreBone *pCoreBone);
69 static bool saveCoreKeyframe(std::ofstream& file, const std::string& strFilename, CalCoreKeyframe *pCoreKeyframe, int version,
70 bool needTranslation, bool highRangeRequired, bool useAnimationCompression );
71 static bool saveCompressedCoreKeyframe(std::ofstream& file, const std::string& strFilename, CalCoreKeyframe *pCoreKeyframe, CalSaverAnimationOptions *pOptions);
72 static bool saveCoreSubmesh(std::ofstream& file, const std::string& strFilename, CalCoreSubmesh *pCoreSubmesh);
73 static bool saveCoreTrack(std::ofstream& file, const std::string& strFilename, CalCoreTrack *pCoreTrack, int version, CalSaverAnimationOptions *pOptions = NULL);
74 static bool saveCoreMorphKeyframe(std::ofstream& file, const std::string& strFilename, CalCoreMorphKeyframe *pCoreMorphKeyframe);
75 static bool saveCoreMorphTrack(std::ofstream& file, const std::string& strFilename, CalCoreMorphTrack *pCoreMorphTrack);
76
77
78 static bool saveXmlCoreSkeleton(const std::string& strFilename, CalCoreSkeleton *pCoreSkeleton);
79 static bool saveXmlCoreAnimation(const std::string& strFilename, CalCoreAnimation *pCoreAnimation);
80 static bool saveXmlCoreAnimatedMorph(const std::string& strFilename, CalCoreAnimatedMorph *pCoreAnimatedMorph);
81 static bool saveXmlCoreMesh(const std::string& strFilename, CalCoreMesh *pCoreMesh);
82 static bool saveXmlCoreMaterial(const std::string& strFilename, CalCoreMaterial *pCoreMaterial);
83};
84
85#endif
86
87//****************************************************************************//
The core animatedMorph class.
Definition coreanimatedmorph.h:37
Definition coreanimation.h:24
Definition corebone.h:35
The core keyframe class.
Definition corekeyframe.h:32
Definition corematerial.h:23
Definition coremesh.h:24
Definition coremodel.h:26
The core keyframe class.
Definition coremorphkeyframe.h:32
Definition coremorphtrack.h:39
Definition coreskeleton.h:25
Definition coresubmesh.h:32
Definition coretrack.h:27
The saver class.
Definition saver.h:46
Definition saver.h:59
The vector class.
Definition vector.h:37

Generated by The Cal3D Team with Doxygen 1.10.0