Changeset 8558 in orxonox.OLD for branches/bsp_model/src/lib/graphics
- Timestamp:
- Jun 17, 2006, 11:46:11 AM (18 years ago)
- Location:
- branches/bsp_model/src/lib/graphics/importer/md3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8557 r8558 40 40 this->tmpBoneFrame = new MD3BoneFrame(); 41 41 this->tmpMesh = new sVec3D[2048]; //!< the temporary mesh, hopefully newer bigger than 2048 vertices 42 this->tmpNormal = new MD3Normal[2048]; //!< the temporary normals 42 43 } 43 44 … … 124 125 //interpolate vertex normals 125 126 this->drawVertexNormals(frame, this->interpolateVertexNormals(&mesh->normals[data->animationState.currentFrame], 126 &mesh->normals[data->animationState.nextFrame], data->animationState.interpolationFraction ));127 &mesh->normals[data->animationState.nextFrame], data->animationState.interpolationFraction, mesh)); 127 128 } 128 129 else { … … 249 250 * interpolate vertex normal 250 251 */ 251 MD3Normal* MD3Model::interpolateVertexNormals(MD3Normal* curNormals, MD3Normal* nextNormals, float frac) 252 {} 252 MD3Normal* MD3Model::interpolateVertexNormals(MD3Normal* currNormals, MD3Normal* nextNormals, float frac, MD3Mesh* mesh) 253 { 254 for( int i = 0; i < mesh->header->vertexNum; i++) 255 { 256 this->tmpNormal[i].vertexNormal[0] = (int)((1.0f - frac) * currNormals[i].vertexNormal[0] + frac * nextNormals[i].vertexNormal[0]); 257 this->tmpNormal[i].vertexNormal[1] = (int)((1.0f - frac) * currNormals[i].vertexNormal[1] + frac * nextNormals[i].vertexNormal[1]); 258 } 259 260 return this->tmpNormal; 261 } 253 262 254 263 -
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
r8557 r8558 50 50 51 51 sVec3D* interpolateMeshFrame(sVec3D* currMeshFrame, sVec3D* nextMeshFrame, float frac, MD3Mesh* mesh); 52 MD3Normal* interpolateVertexNormals(MD3Normal* curNormals, MD3Normal* nextNormals, float frac );52 MD3Normal* interpolateVertexNormals(MD3Normal* curNormals, MD3Normal* nextNormals, float frac, MD3Mesh* mesh); 53 53 float* interpolateTransformation(MD3Tag* currFrameTag, MD3Tag* nextFrameTag, float frac); 54 54 … … 60 60 61 61 MD3BoneFrame* tmpBoneFrame; //!< a temporary bone frame 62 sVec3D* tmpMesh; //!< a temportary mesh frame 62 sVec3D* tmpMesh; //!< a temporary mesh frame 63 MD3Normal* tmpNormal; //!< a temporary normals frame 63 64 }; 64 65
Note: See TracChangeset
for help on using the changeset viewer.