Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8566 in orxonox.OLD for branches/bsp_model/src


Ignore:
Timestamp:
Jun 17, 2006, 2:29:16 PM (18 years ago)
Author:
patrick
Message:

bsp: md3 model drawing now works, but doesn't do anything

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_data.h

    r8550 r8566  
    106106      std::string               loadFilename;      //!< filename of the actual file from which data was loaded
    107107
    108       int                       boneFrameNum;      //!< number of anumation key fames in the models
    109       int                       tagNum;            //!< number of tags
    110       int                       meshNum;           //!< number of meshes
    111 
    112       int                       maxTextureNum;     //!< maximum number of unique used in an md3 file
    113       int                       boneFrameStart;    //!< starting position of bone frame data structures
    114       int                       tagStart;          //!< starting position of tag-structures
    115 
    116       int                       meshStart;         //!< starting position of mesh structures
    117 
    118       int                       fileSize;          //!< file size
    119 
    120108      MD3AnimationState         animationState;    //!< the animation state of this model
    121109
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc

    r8565 r8566  
    4343    this->tmpBoneFrame = new MD3BoneFrame();
    4444
    45     this->tmpMesh = new sVec3D*[this->md3Data->meshNum];
    46     for( int i = 0; i < this->md3Data->meshNum; i++)
     45    this->tmpMesh = new sVec3D*[this->md3Data->header->meshNum];
     46    for( int i = 0; i < this->md3Data->header->meshNum; i++)
    4747      this->tmpMesh[i] = new sVec3D[this->md3Data->meshes[i]->header->vertexNum];
    4848
    49     this->tmpNormal = new MD3Normal*[this->md3Data->meshNum];
    50     for( int i = 0; i < this->md3Data->meshNum; i++)
     49    this->tmpNormal = new MD3Normal*[this->md3Data->header->meshNum];
     50    for( int i = 0; i < this->md3Data->header->meshNum; i++)
    5151      this->tmpNormal[i] = new MD3Normal[this->md3Data->meshes[i]->header->vertexNum];
    5252
    53     this->tmpMatrix = new float*[this->md3Data->tagNum];
    54     for( int i = 0; i < this->md3Data->tagNum; i++)
     53    this->tmpMatrix = new float*[this->md3Data->header->tagNum];
     54    for( int i = 0; i < this->md3Data->header->tagNum; i++)
    5555      this->tmpMatrix[i] = new float[16];
    5656  }
     
    9292
    9393    //draw all meshes of current frame of this model
    94     for( int i = 0;  i < data->meshNum; i++)
     94    for( int i = 0;  i < data->header->meshNum; i++)
    9595    {
    9696      MD3Mesh* mesh = data->meshes[i];
     
    190190  void MD3Model::draw() const
    191191  {
    192     PRINTF(0)("draw\n");
    193 
    194192    //draw current bone frame
    195193    this->draw(this->md3Data);
     
    221219
    222220    //draw all meshes of current frame of this model
    223     for( int i = 0;  i < data->meshNum; i++)
     221    for( int i = 0;  i < data->header->meshNum; i++)
    224222    {
    225223      MD3Mesh* mesh = data->meshes[i];
Note: See TracChangeset for help on using the changeset viewer.