Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8344 in orxonox.OLD


Ignore:
Timestamp:
Jun 13, 2006, 4:42:11 PM (18 years ago)
Author:
patrick
Message:

bsp: md data structures separated

Location:
branches/bsp_model/src/lib/graphics/importer
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/Makefile.am

    r8343 r8344  
    55
    66libORXimporter_a_SOURCES = model.cc \
     7                           md_model_structure.cc \
    78                           vertex_array_model.cc \
    89                           grid.cc \
     
    2627                           md3/md3_animation.cc \
    2728                           md3/md3_bone_frame.cc \
    28                            md3/md3_mesh.cc
     29                           md3/md3_mesh.cc \
     30                           md3/md3_data.cc
    2931
    3032
     
    3537noinst_HEADERS = \
    3638                model.h \
     39                md_model_structure.cc \
    3740                tc.h \
    3841                vertex_array_model.h \
     
    5962                md3/md3_animation.h \
    6063                md3/md3_bone_frame.h \
    61                 md3/md3_mesh.h
     64                md3/md3_mesh.h \
     65                md3/md3_data.h
    6266
  • branches/bsp_model/src/lib/graphics/importer/md2Model.h

    r7221 r8344  
    2323#include "model.h"
    2424#include "material.h"
     25
     26#include "md_model_structure.h"
    2527
    2628//! These are the needed defines for the max values when loading .MD2 files
     
    6466   int offsetEnd;                       //!< The end of the file offset
    6567};
    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   unsigned 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   int              bStoppable;           //!< 1 if the animation is stoppable 0 else
    119 } sAnim;
    120 
    121 
    122 //! animation state definition
    123 typedef struct
    124 {
    125   int              startFrame;           //!< the start frame of an animation
    126   int              endFrame;             //!< last frame of the animation
    127   int              fps;                  //!< fps of the animaion (speed)
    128 
    129   float            localTime;            //!< the local time
    130   float            lastTime;             //!< last time stamp
    131   float            interpolationState;   //!< the state of the animation [0..1]
    132 
    133   int              type;                 //!< animation type
    134 
    135   int              currentFrame;         //!< the current frame
    136   int              nextFrame;            //!< the next frame in the list
    137   int              numPlays;             //!< the number of times, this has been played in series
    138 
    139   int              animPlaybackMode;     //!< the playback mode
    140 } sAnimState;
    14168
    14269
Note: See TracChangeset for help on using the changeset viewer.