- Cal3D 0.11 API Reference -

global.h

00001 //****************************************************************************//
00002 // global.h                                                                   //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_GLOBAL_H
00012 #define CAL_GLOBAL_H
00013 
00014 
00015 // platform dependent includes
00016 #include "cal3d/platform.h"
00017 
00018 //****************************************************************************//
00019 // Define options
00020 //****************************************************************************//
00021 
00022 //Uncomment this if you want to use 16bit indices or configure the compiler
00023 
00024 //#define CAL_16BIT_INDICES
00025 
00026 #ifdef CAL_16BIT_INDICES 
00027 typedef unsigned short CalIndex; 
00028 #else 
00029 typedef int CalIndex; 
00030 #endif
00031 
00032 
00033 //****************************************************************************//
00034 // Global Cal3D namespace for constants, ...                                  //
00035 //****************************************************************************//
00036 
00037 namespace cal3d
00038 {  
00039   // global typedefs
00040   typedef void *UserData;
00041 
00042   // file magic cookies
00043   const char SKELETON_FILE_MAGIC[4]  = { 'C', 'S', 'F', '\0' };
00044   const char ANIMATION_FILE_MAGIC[4] = { 'C', 'A', 'F', '\0' };
00045   const char ANIMATEDMORPH_FILE_MAGIC[4] = { 'C', 'P', 'F', '\0' };
00046   const char MESH_FILE_MAGIC[4]      = { 'C', 'M', 'F', '\0' };
00047   const char MATERIAL_FILE_MAGIC[4]  = { 'C', 'R', 'F', '\0' };
00048 
00049   const char SKELETON_XMLFILE_MAGIC[4]  = { 'X', 'S', 'F', '\0' };
00050   const char ANIMATION_XMLFILE_MAGIC[4] = { 'X', 'A', 'F', '\0' };
00051   const char MESH_XMLFILE_MAGIC[4]      = { 'X', 'M', 'F', '\0' };
00052   const char MATERIAL_XMLFILE_MAGIC[4]  = { 'X', 'R', 'F', '\0' };
00053 
00054   // library version       // 0.13.0
00055 #define CAL3D_VERSION 1300
00056   const int LIBRARY_VERSION = CAL3D_VERSION;
00057 
00058 
00059   // file versions
00060   const int CURRENT_FILE_VERSION = LIBRARY_VERSION;
00061   const int EARLIEST_COMPATIBLE_FILE_VERSION = 699;
00062 
00063   const int FIRST_FILE_VERSION_WITH_ANIMATION_COMPRESSION6 = 1300;
00064   const int FIRST_FILE_VERSION_WITH_ANIMATION_COMPRESSION5 = 1300;
00065   const int FIRST_FILE_VERSION_WITH_ANIMATION_COMPRESSION4 = 1300;
00066   const int FIRST_FILE_VERSION_WITH_ANIMATION_COMPRESSION = 1300;
00067   const int FIRST_FILE_VERSION_WITH_VERTEX_COLORS = 1300;
00068   const int FIRST_FILE_VERSION_WITH_NODE_LIGHTS = 1300;
00069   const int FIRST_FILE_VERSION_WITH_MATERIAL_TYPES = 1300;
00070   const int FIRST_FILE_VERSION_WITH_MORPH_TARGETS_IN_MORPH_FILES = 1300;
00071   const int FIRST_FILE_VERSION_WITH_RELATIVE_BONE_TRANSLATION = 1300;
00072 
00073   inline bool versionHasCompressionFlag(int version) {
00074     return version >= 1300;
00075   }
00080   class CAL3D_API noncopyable
00081   {
00082   protected:
00083     noncopyable() {}
00084     ~noncopyable() {}
00085   private:  // emphasize the following members are private
00086     noncopyable(const noncopyable&);
00087     const noncopyable& operator=(const noncopyable&);
00088   };
00089 }
00090 
00091 struct CalHeader
00092 {
00093   int version;
00094   char const* magic;
00095 };
00096 namespace Cal = cal3d;
00097 
00098 #endif

Generated by The Cal3D Team with Doxygen 1.7.3