home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 July & August / PCWorld_2006-07-08_cd.bin / temacd / planearcade / planearcade.exe / Tank3.bmp / bspclass.h < prev    next >
C/C++ Source or Header  |  2004-03-17  |  2KB  |  102 lines

  1.  
  2.  
  3.  
  4. //------------------------------------------------------------------
  5. // Name: BSP class
  6. // Desc: *********
  7. //------------------------------------------------------------------
  8. class BSP
  9. {
  10. private:
  11.     //subor
  12.     FILE *FileBsp;
  13.  
  14.     //////////////
  15.     //MATERIALY //   
  16.     //////////////
  17.     void SetBlendMode(int BlendType);
  18.  
  19.     //////////////
  20.     //GROUP FACE//   
  21.     //////////////
  22.     void InitializeGroupTextures(int Index);
  23.     void ClearGroupTextures(int Index);
  24.  
  25.     void RenderGroup(int Index);
  26.     
  27.     void OptimalizePVS();
  28.     void NoOptimalize();
  29.     void Optimalize();
  30.  
  31.     ////////
  32.     //READ//
  33.     ////////
  34.     void ReadGroup();
  35.     void ReadFace();
  36.     void ReadPlane();
  37.     void ReadNode();
  38.     void ReadLeaf();
  39.     void ReadLight();
  40.     void ReadLightMap();
  41.  
  42.     
  43.     /////////////////
  44.     //VERTEX BUFFER//  
  45.     /////////////////
  46.     LPDIRECT3DVERTEXBUFFER9 g_pVB ;
  47.     void CreateVertexBuffer();
  48.     void FillVertexBuffer();
  49.     
  50.  
  51. public:
  52.  
  53.     //info
  54.     int NumVisibleFaces;
  55.  
  56.     //skupina
  57.     int NumGroups;
  58.     BSPGROUP *Group;
  59.  
  60.     //plosky
  61.     int NumFaces;
  62.     BSPFACE *Face;
  63.  
  64.     //roviny
  65.     int NumPlanes;
  66.     PLANE *Plane;
  67.  
  68.     //nody
  69.     int NumNodes;
  70.     BSPNODE *Node;
  71.  
  72.     //listy
  73.     int NumLeafs;
  74.     BSPLEAF *Leaf; 
  75.  
  76.     //svetla
  77.     int NumLights;
  78.     BSPLIGHT *Light;
  79.  
  80.     //lightmapy
  81.     int NumLightMaps;
  82.     LPDIRECT3DTEXTURE9 *g_pLightMap; 
  83.  
  84.     /////////////
  85.     //UNIVERZAL//   
  86.     /////////////
  87.  
  88.     BSP();
  89.  
  90.     void Load(char *FileName);
  91.     void Render();
  92.     void CleanUp();
  93.  
  94.     void SetTexture(int ToGroup,LPDIRECT3DTEXTURE9 Tex);
  95.  
  96.     ///////////////
  97.     //Node & LEAF//
  98.     ///////////////
  99.     int GetLeafIndex(VECTOR3D P);
  100.  
  101.  
  102. };