[4065] | 1 | /* |
---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
| 10 | |
---|
| 11 | ### File Specific: |
---|
| 12 | main-programmer: Patrick Boenzli |
---|
| 13 | */ |
---|
| 14 | |
---|
| 15 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
---|
| 16 | |
---|
| 17 | #include "md2Model.h" |
---|
| 18 | |
---|
| 19 | using namespace std; |
---|
| 20 | |
---|
[4077] | 21 | /******************************************************************************** |
---|
| 22 | * MD2MODEL * |
---|
| 23 | ********************************************************************************/ |
---|
[4065] | 24 | |
---|
| 25 | /** |
---|
| 26 | \brief standard constructor |
---|
[4076] | 27 | |
---|
| 28 | creates a new model |
---|
[4065] | 29 | */ |
---|
| 30 | MD2Model::MD2Model () |
---|
| 31 | { |
---|
| 32 | this->setClassName ("MD2Model"); |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | /** |
---|
| 37 | \brief standard deconstructor |
---|
| 38 | |
---|
| 39 | */ |
---|
| 40 | MD2Model::~MD2Model () |
---|
| 41 | { |
---|
| 42 | // delete what has to be deleted here |
---|
| 43 | } |
---|
[4076] | 44 | |
---|
| 45 | |
---|
[4077] | 46 | /******************************************************************************** |
---|
| 47 | * MD2LOADER * |
---|
| 48 | ********************************************************************************/ |
---|
| 49 | |
---|
[4076] | 50 | /** |
---|
| 51 | \brief standard deconstructor |
---|
| 52 | |
---|
| 53 | creates a new model loader |
---|
| 54 | */ |
---|
| 55 | MD2Loader::MD2Loader() |
---|
[4077] | 56 | { |
---|
| 57 | this->setClassName ("MD2Loader"); |
---|
| 58 | // Here we initialize our structures to 0 |
---|
| 59 | memset(&m_Header, 0, sizeof(tMd2Header)); |
---|
| 60 | // Set the pointers to null |
---|
| 61 | m_pSkins=NULL; |
---|
| 62 | m_pTexCoords=NULL; |
---|
| 63 | m_pTriangles=NULL; |
---|
| 64 | m_pFrames=NULL; |
---|
| 65 | } |
---|
[4076] | 66 | |
---|
| 67 | /** |
---|
| 68 | \brief standard deconstructor |
---|
| 69 | |
---|
| 70 | */ |
---|
| 71 | MD2Loader::~MD2Loader() |
---|
| 72 | {} |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | /** |
---|
| 76 | \brief this is called by the client to open the .Md2 file, read it, then clean up |
---|
| 77 | \param model to load in |
---|
| 78 | \param file name to load |
---|
| 79 | \param texture name to load |
---|
| 80 | */ |
---|
| 81 | bool MD2Loader::importMD2(t3DModel *pModel, char *strFileName, char *strTexture) |
---|
| 82 | {} |
---|
| 83 | |
---|
| 84 | /** |
---|
| 85 | \brief This function reads in all of the model's data, except the animation frames |
---|
| 86 | */ |
---|
| 87 | void MD2Loader::readMD2Data() |
---|
| 88 | {} |
---|
| 89 | |
---|
| 90 | /** |
---|
| 91 | \brief this function fills in the animation list for each animation by name and frame |
---|
| 92 | \param model |
---|
| 93 | */ |
---|
| 94 | void MD2Loader::parseAnimations(t3DModel *pModel) |
---|
| 95 | {} |
---|
| 96 | |
---|
| 97 | /** |
---|
| 98 | \brief this function converts the .md2 structures to our own model and object structures: decompress |
---|
| 99 | \param model |
---|
| 100 | */ |
---|
| 101 | void MD2Loader::convertDataStructures(t3DModel *pModel) |
---|
| 102 | {} |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | /** |
---|
| 106 | \brief this function conputes the normals of the model |
---|
| 107 | \param model |
---|
| 108 | */ |
---|
| 109 | void MD2Loader::computeNormals(t3DModel *pModel) |
---|
| 110 | {} |
---|
| 111 | |
---|
| 112 | /** |
---|
| 113 | \brief This function cleans up our allocated memory and closes the file |
---|
| 114 | */ |
---|
| 115 | void MD2Loader::cleanUp() |
---|
| 116 | {} |
---|