Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
CCompiledBsp.h
00001 #ifndef __cBSP_h__ 00002 #define __cBSP_h__ 00003 00005 // MarSTD version 2004 - (c)2004 - Marcel Smit // 00006 // // 00007 // [email protected] // 00008 // [email protected] // 00009 // // 00010 // This code may not be used in a commercial product without my // 00011 // permission. If you redistribute it, this message must remain // 00012 // intact. If you use this code, some acknowledgement would be // 00013 // appreciated. ;-) // 00015 00017 00018 00019 00020 #include "CGeomCompiler.h" 00021 00022 typedef struct 00023 { 00024 00025 CPlane plane; 00026 00027 int fc; 00028 int bc; 00029 int dc; 00030 int sc; 00031 00032 } CCompiledBspSplitInfo; 00033 00034 typedef struct 00035 { 00036 00037 void* data; 00038 CSphere sphere; 00039 00040 } CCompiledBspPolyData; 00041 00043 00046 class CCompiledBsp : public CCompiledMesh 00047 { 00048 00049 public: 00050 00051 CCompiledBsp(); 00052 ~CCompiledBsp(); 00053 00054 public: 00055 00056 CPlane plane; 00057 CCompiledBsp* child[2]; 00058 00059 CCompiledMesh* root; 00060 00061 public: 00062 00067 void compile(CBsp* bsp); 00068 00069 protected: 00070 00071 void getLeafNodes(CBsp* bsp, std::vector<CBsp*>& bspArray); 00072 void getLeafNodes(std::vector<CCompiledBsp*>& cbspArray); 00073 void replicateHierarchy(CBsp* bsp); 00074 00075 public: 00076 00080 void getHitLeafs(CVector& point, std::vector<CCompiledBsp*>& bspArray); 00084 void getHitLeafs(CSphere& sohere, std::vector<CCompiledBsp*>& bspArray); 00085 00086 }; 00087 00088 #endif
Generated on Tue Feb 8 21:59:02 2005 for MarSTDv2004 by
