Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 27, 2006, 3:35:01 PM (18 years ago)
Author:
bottac
Message:

further reformating

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/bsp_file.h

    r7385 r7395  
    2121typedef struct
    2222{
    23   float x;
    24   float y;
    25   float z;
    26   float d;
     23  float x;     //!< 1st component of the plane's normal
     24  float y;     //!< 2nd component of the plane's normal
     25  float z;     //!< 3rd component of the plane's normal
     26  float d;     //!< distance of the plane to the origin
    2727}
    2828plane;
     
    3030typedef struct
    3131{
    32   float mins [ 3 ]; //Bounding box min coord.
    33   float maxs [ 3 ]; //Bounding box max coord.
    34   int face; //First face for model.
    35   int n_faces; //Number of faces for model.
    36   int brush; //First brush for model.
    37   int n_brushes; //
     32  float mins [ 3 ]; //!< Bounding box min coord.
     33  float maxs [ 3 ]; //!< Bounding box max coord.
     34  int face;         //!< First face for model.
     35  int n_faces;      //!< Number of faces for model.
     36  int brush;        //!< First brush for model.
     37  int n_brushes;    //!< Number of brushes
    3838}
    3939model;
     
    4141typedef struct
    4242{
    43   int plane; //Plane index.
    44   int left; //Children indices. Negative numbers are leaf indices: -(leaf+1).
    45   int right;
    46   int mins[ 3 ]; //Integer bounding box min coord.
    47   int maxs[ 3 ]; //Integer bounding box max coord.
     43  int plane;        //!< Plane index.
     44  int left;         //!< 1st Child index. Negative numbers are leaf indices: -(leaf+1).
     45  int right;        //!< 2nd Child index. Negative numbers are leaf indices: -(leaf+1).
     46  int mins[ 3 ];    //!< Integer bounding box min coord.
     47  int maxs[ 3 ];    //!< Integer bounding box max coord.
    4848}
    4949node;
     
    5151typedef struct
    5252{
    53   int cluster; //       Visdata cluster index.
    54   int area; //  Areaportal area.
    55   int mins[ 3 ]; // Integer bounding box min coord.
    56   int maxs[ 3 ]; // Integer bounding box max coord.
    57   int leafface; // First leafface for leaf.
    58   int n_leaffaces; //Number of leaffaces for leaf.
    59   int leafbrush_first; // leafbrush for leaf.
    60   int n_leafbrushes; // Number of leafbrushes for leaf.
     53  int cluster;            //!< Visdata cluster index.
     54  int area;               //!< Areaportal area.
     55  int mins[ 3 ];          //!< Integer bounding box min coord.
     56  int maxs[ 3 ];          //!< Integer bounding box max coord.
     57  int leafface;           //!< First leafface for leaf.
     58  int n_leaffaces;        //!< Number of leaffaces for leaf.
     59  int leafbrush_first;    //!< leafbrush for leaf.
     60  int n_leafbrushes;      //!< Number of leafbrushes for leaf.
    6161}
    6262leaf;
     
    6464typedef struct
    6565{
    66   int brushside;        //First brushside for brush.
    67   int n_brushsides;     //Number of brushsides for brush.
    68   int texture;  //Texture index.
     66  int brushside;        //!< First brushside for brush.
     67  int n_brushsides;     //!< Number of brushsides for brush.
     68  int texture;          //!< Texture index.
    6969}
    7070brush;
     
    7272typedef struct
    7373{
    74   int plane; //Plane index.
    75   int texture;  //Texture index.
     74  int plane;    //!< Plane index.
     75  int texture;  //!< Texture index.
    7676}
    7777brushside;
     
    7979struct face
    8080{
    81   int texture;  // Texture index.
    82   int effect;   // Index into lump 12 (Effects), or -1.
    83   int type;     // Face type. 1=polygon, 2=patch, 3=mesh, 4=billboard
    84   int vertex;   // Index of first vertex.
    85   int n_vertexes; // Number of vertices.
    86   int meshvert;   // Index of first meshvert.
    87   int n_meshverts; // Number of meshverts.
    88   int lm_index;  // Lightmap index.
    89   int lm_start [ 2 ]; // Corner of this face's lightmap image in lightmap.
    90   int lm_size[ 2 ]; // Size of this face's lightmap image in lightmap.
    91   float lm_origin [ 3 ] ; //  World space origin of lightmap.
    92   float lm_vecs [ 2 ][ 3 ]; // World space lightmap s and t unit vectors.
    93   float normal[ 3 ]; // Surface normal.
    94   int size [ 2 ] ; // Patch dimensions.
     81  int texture;          //!< Texture index.
     82  int effect;           //!< Index into lump 12 (Effects), or -1.
     83  int type;             //!< Face type. 1=polygon, 2=patch, 3=mesh, 4=billboard
     84  int vertex;           //!< Index of first vertex.
     85  int n_vertexes;       //!< Number of vertices.
     86  int meshvert;         //!< Index of first meshvert.
     87  int n_meshverts;      //!< Number of meshverts.
     88  int lm_index;         //!< Lightmap index.
     89  int lm_start [ 2 ];   //!< Corner of this face's lightmap image in lightmap.
     90  int lm_size[ 2 ];     //!< Size of this face's lightmap image in lightmap.
     91  float lm_origin [ 3 ] ;    //!<  World space origin of lightmap.
     92  float lm_vecs [ 2 ][ 3 ];  //!< World space lightmap s and t unit vectors.
     93  float normal[ 3 ];         //!< Surface normal.
     94  int size [ 2 ] ;           //!< Patch dimensions.
    9595} ;
    9696
    9797typedef struct
    9898{
    99   float position[ 3 ]; // Vertex position.
    100   float texcoord[ 2 ][ 2 ]; // Vertex texture coordinates. 0=surface, 1=lightmap.
    101   float normal[ 3 ]; // Vertex normal.
    102   unsigned char color [ 4 ]; // Vertex color. RGBA.
     99  float position[ 3 ];        //!< Vertex position.
     100  float texcoord[ 2 ][ 2 ];   //!< Vertex texture coordinates. [0][x]=surface, [1][x]=lightmap.
     101  float normal[ 3 ];          //!< Vertex normal.
     102  unsigned char color [ 4 ];  //!< Vertex color. RGBA.
    103103}
    104104BspVertex;
     
    108108  int offset;
    109109}
    110 meshvert;
     110meshvert;                    //!< Integer offset to mesh vertex
    111111
    112112typedef struct
     
    140140  BspTreeNode* root;
    141141  char header [ 280 ];       //!< Buffer for header of BSP-File
    142   char* nodes;               //!< Buffer to store BSP-Tree-Nodes
    143   char* leaves;              //!< Buffer to store BSP-Tree-Leaves
    144   char* planes;              //!< Buffer to store planes separateing the space
    145   char* bspModels;           //!< Buffer to store BSP-Model-List
     142  node* nodes;               //!< Buffer to store BSP-Tree-Nodes
     143  leaf* leaves;              //!< Buffer to store BSP-Tree-Leaves
     144  plane* planes;             //!< Buffer to store planes separateing the space
     145  model* bspModels;          //!< Buffer to store BSP-Model-List
    146146  char* leafFaces;           //!< Buffer to store leafFaces
    147   char* faces;               //!<
     147  face* faces;               //!<
    148148  char* leafBrushes;         //!< Buffer to store brush indice
    149149  char* brushes;             //!< Buffer to store  brushes
     
    153153  char* visData;             //!<
    154154  char* textures;            //!<
    155 
    156 
    157155  char* patchVertice;
    158156  char* patchIndexes;
    159157  char* patchTrianglesPerRow;
     158 
     159 
    160160  int** patchRowIndexes;
    161161  VertexArrayModel** VertexArrayModels;
Note: See TracChangeset for help on using the changeset viewer.