md3-model.h

Go to the documentation of this file.
00001 /*
00002  * md3-model.h
00003  *
00004  * Copyright (C) 2009  Thomas A. Vaughan
00005  * All rights reserved.
00006  *
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions are met:
00010  *     * Redistributions of source code must retain the above copyright
00011  *       notice, this list of conditions and the following disclaimer.
00012  *     * Redistributions in binary form must reproduce the above copyright
00013  *       notice, this list of conditions and the following disclaimer in the
00014  *       documentation and/or other materials provided with the distribution.
00015  *     * Neither the name of the <organization> nor the
00016  *       names of its contributors may be used to endorse or promote products
00017  *       derived from this software without specific prior written permission.
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY THOMAS A. VAUGHAN ''AS IS'' AND ANY
00020  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00021  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00022  * DISCLAIMED. IN NO EVENT SHALL THOMAS A. VAUGHAN BE LIABLE FOR ANY
00023  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00024  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00025  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00026  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00027  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  *
00030  * Library that supports the Quake 3 MD3 model format.
00031  */
00032 
00033 #ifndef WAVE_GLUT_MD3_MODEL_H__
00034 #define WAVE_GLUT_MD3_MODEL_H__
00035 
00036 // includes --------------------------------------------------------------------
00037 #include "glut/renderable.h"
00038 #include "threadsafe/smart_ptr.h"
00039 
00040 
00041 namespace md3 {
00042 
00043 
00044 ////////////////////////////////////////////////////////////////////////////////
00045 ///
00046 /// \ingroup models.h
00047 /// \defgroup md3_model Quake 3 MD3 Format 3D Model Library
00048 ///
00049 /// \n
00050 /// This library supports loading and rendering of md3 models.
00051 ///
00052 /// For references, see:
00053 ///  - http://en.wikipedia.org/wiki/MD3
00054 ///  - http://ioquake3.org/extras/models/  (many models here!)
00055 ///
00056 /// Pretty much all of this code is from David Henry, see
00057 /// http://tfc.duke.free.fr/
00058 ///
00059 /// His code is released under the MIT License, and everything in this
00060 /// module (md3-model) is likewise released under that license.  Thanks
00061 /// again, David Henry!
00062 ///
00063 /// <b>Note to implementers:</b> do not modify the original MD3 model files!
00064 /// They are the ones with the David Henry copyright.  This way, it will be
00065 /// easy to pick up changes from his source if necessary.  Any wave-glut-specific
00066 /// changes should be made in a layer on top of those objects.
00067 ///
00068 ////////////////////////////////////////////////////////////////////////////////
00069 /*@{*/
00070 
00071 
00072 ////////////////////////////////////////////////////////////////////////////////
00073 //
00074 //      public API
00075 //
00076 ////////////////////////////////////////////////////////////////////////////////
00077 
00078 smart_ptr<glut::Renderable> loadMd3Player(IN const char * model_path);
00079 
00080 
00081 
00082 };      // md3 namespace
00083 
00084 
00085 #endif  // WAVE_GLUT_MD3_MODEL_H__
00086