- 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 
25 class CalCoreModel;
26 class CalCoreSkeleton;
27 class CalCoreBone;
28 class CalCoreAnimation;
30 class CalCoreMesh;
31 class CalCoreSubmesh;
32 class CalCoreMaterial;
33 class CalCoreKeyframe;
34 class CalCoreMorphTrack;
36 class CalCoreTrack;
37 
38 //****************************************************************************//
39 // Class declaration //
40 //****************************************************************************//
41 
42  /*****************************************************************************/
47 public:
48  bool bCompressKeyframes;
49 
50 protected:
51  CalVector keyframe_min;
52  CalVector keyframe_scale;
53  float duration;
54 
55  friend class CalSaver;
56 };
57 
58 class CAL3D_API CalSaver
59 {
60 public:
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 
67 protected:
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 //****************************************************************************//
Definition: coremodel.h:25
Definition: corematerial.h:22
The saver class.
Definition: saver.h:46
Definition: coreanimation.h:23
Definition: corebone.h:34
The core keyframe class.
Definition: coremorphkeyframe.h:31
Definition: coreskeleton.h:24
Definition: coremesh.h:23
Definition: coremorphtrack.h:38
The core animatedMorph class.
Definition: coreanimatedmorph.h:36
Definition: saver.h:58
The vector class.
Definition: vector.h:36
Definition: coresubmesh.h:31
Definition: coretrack.h:26
The core keyframe class.
Definition: corekeyframe.h:31

Generated by The Cal3D Team with Doxygen 1.8.14