Changeset 6180 in orxonox.OLD for branches/christmas_branche/src/lib
- Timestamp:
- Dec 20, 2005, 3:21:19 AM (19 years ago)
- Location:
- branches/christmas_branche/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/lib/graphics/importer/md2Model.cc
r6175 r6180 38 38 //! again one of these strange id software parts 39 39 static float *shadeDots = MD2Model::anormsDots[0]; 40 41 42 static sVec3D verticesList[MD2_MAX_VERTICES]; 43 40 44 41 45 //! the angle under which the model is viewd, used internaly … … 108 112 saving of data anyway 109 113 */ 110 void MD2Model::interpolate( sVec3D* verticesList)114 void MD2Model::interpolate(/*sVec3D* verticesList*/) 111 115 { 112 116 sVec3D* currVec; … … 149 153 150 154 151 static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */ 155 152 156 153 157 /** … … 159 163 this->animationState.localTime += time; 160 164 161 if( likely(this->animationState.localTime > 0.0)) 162 this->animate(); 163 165 this->animate(); 164 166 this->processLighting(); 165 this->interpolate( verticesList);167 this->interpolate(/*verticesList*/); 166 168 } 167 169 … … 192 194 glEnable(GL_CULL_FACE); 193 195 glCullFace(GL_BACK); 194 195 196 196 197 this->data->material->select(); -
branches/christmas_branche/src/lib/graphics/importer/md2Model.h
r6175 r6180 65 65 }; 66 66 67 68 //! compressed vertex data: char insetead of float, the value will be expanded by the scale value. only for loading 69 typedef struct 70 { 71 char v[3]; //!< the vector of the vertex 72 unsigned char lightNormalIndex; //!< the index of the light normal 73 } sVertex; 74 75 76 //! compressed texture offset data: coords scaled by the texture size. Only for loading 77 typedef struct 78 { 79 short s; //!< the s,t coordinates of a texture 80 short t; //!< the s,t coordinates of a texture 81 } sTexCoor; 82 83 84 //! holds tha informations about a md2 frame 85 typedef struct 86 { 87 sVec3D scale; //!< scales values of the model 88 sVec3D translate; //!< translates the model 89 char name[16]; //!< frame name: something like "run32" 90 sVertex pVertices[1]; //!< first vertex of thes frame 91 } sFrame; 92 93 94 //! holds the information about a triangle 95 typedef struct 96 { 97 unsigned short indexToVertices[3]; //!< index to the verteces of the triangle 98 unsigned short indexToTexCoor[3]; //!< index to the texture coordinates 99 } sTriangle; 100 101 102 103 //! the command list of the md2 model, very md2 specific 104 typedef struct 105 { 106 float s; //!< texture coordinate 1 107 float t; //!< texture coordinate 2 108 int vertexIndex; //!< index of the vertex in the vertex list 109 } glCommandVertex; 110 111 112 //! a md2 animation definition 113 typedef struct 114 { 115 int firstFrame; //!< first frame of the animation 116 int lastFrame; //!< last frame of the animation 117 int fps; //!< speed: number of frames per second 118 } sAnim; 119 120 121 //! animation state definition 122 typedef struct 123 { 124 int startFrame; //!< the start frame of an animation 125 int endFrame; //!< last frame of the animation 126 int fps; //!< fps of the animaion (speed) 127 128 float localTime; //!< the local time 129 float lastTime; //!< last time stamp 130 float interpolationState; //!< the state of the animation [0..1] 131 132 int type; //!< animation type 133 134 int currentFrame; //!< the current frame 135 int nextFrame; //!< the next frame in the list 136 } sAnimState; 67 137 68 138 … … 159 229 void animate(); 160 230 void processLighting(); 161 void interpolate( sVec3D* verticesList);231 void interpolate(/*sVec3D* verticesList*/); 162 232 void renderFrame() const ; 163 233 -
branches/christmas_branche/src/lib/graphics/importer/model.h
r6033 r6180 29 29 30 30 31 32 //! compressed vertex data: char insetead of float, the value will be expanded by the scale value. only for loading33 typedef struct34 {35 char v[3]; //!< the vector of the vertex36 unsigned char lightNormalIndex; //!< the index of the light normal37 } sVertex;38 39 40 //! compressed texture offset data: coords scaled by the texture size. Only for loading41 typedef struct42 {43 short s; //!< the s,t coordinates of a texture44 short t; //!< the s,t coordinates of a texture45 } sTexCoor;46 47 48 //! holds tha informations about a md2 frame49 typedef struct50 {51 sVec3D scale; //!< scales values of the model52 sVec3D translate; //!< translates the model53 char name[16]; //!< frame name: something like "run32"54 sVertex pVertices[1]; //!< first vertex of thes frame55 } sFrame;56 57 58 //! holds the information about a triangle59 typedef struct60 {61 unsigned short indexToVertices[3]; //!< index to the verteces of the triangle62 unsigned short indexToTexCoor[3]; //!< index to the texture coordinates63 } sTriangle;64 65 66 31 //! holds the information about a triangle 67 32 typedef struct … … 72 37 } sTriangleExt; 73 38 74 75 //! the command list of the md2 model, very md2 specific76 typedef struct77 {78 float s; //!< texture coordinate 179 float t; //!< texture coordinate 280 int vertexIndex; //!< index of the vertex in the vertex list81 } glCommandVertex;82 83 84 //! a md2 animation definition85 typedef struct86 {87 int firstFrame; //!< first frame of the animation88 int lastFrame; //!< last frame of the animation89 int fps; //!< speed: number of frames per second90 } sAnim;91 92 93 //! animation state definition94 typedef struct95 {96 int startFrame; //!< the start frame of an animation97 int endFrame; //!< last frame of the animation98 int fps; //!< fps of the animaion (speed)99 100 float localTime; //!< the local time101 float lastTime; //!< last time stamp102 float interpolationState; //!< the state of the animation [0..1]103 104 int type; //!< animation type105 106 int currentFrame; //!< the current frame107 int nextFrame; //!< the next frame in the list108 } sAnimState;109 39 110 40 //! Model Information definitions … … 122 52 123 53 } modelInfo; 124 125 54 126 55
Note: See TracChangeset
for help on using the changeset viewer.