00001 /***************************************************************************************************/ 00002 /***************************************************************************************************/ 00012 /***************************************************************************************************/ 00013 /***************************************************************************************************/ 00014 #ifndef D_BSP_H 00015 #define D_BSP_H 00016 00017 /*------------------------------------ Prototypes ---------------------------------------------*/ 00018 class cWall; 00019 class cArea_Describer; 00020 00021 00022 /*------------------------------------ Includes ---------------------------------------------*/ 00023 #include <math.h> 00024 00025 #include "geo_utils.h" 00026 #include "bsp.h" 00027 #include "ddutil.h" 00028 00029 00030 00031 00032 /*------------------------------------- Classes ---------------------------------------------*/ 00033 00034 /*************************************************************************************************/ 00036 00038 class cWall 00039 { 00040 friend std::ostream &operator<<(std::ostream &os, const cWall &ex);// { return os << ex.p0 << "-->" << ex.p1; }; 00041 public: 00043 cWall(); 00044 00046 cWall(cWall& wall); 00047 00049 cWall( cPoint2D & A, cPoint2D & B); 00050 00051 // trace la ligne du mur dans le back buffer de display 00052 void Display( CDisplay * display ); 00053 00055 BSP_POSITION_DIVIDER Get_Position_Divider( cWall & w ); 00056 00058 00062 BSP_POSITION_DIVIDER Get_Position_Divider_And_Split( cWall & w , cWall & w_front , cWall & w_back ); 00063 00065 double Get_Length(); 00066 00067 cPoint2D p0; 00068 cPoint2D p1; 00069 00070 private: 00072 virtual BSP_POSITION_POINT Get_Position_Point( cPoint2D& p) 00073 { 00074 std::cout << "BSP_POSITION_POINT cWall::Get_Position_Point( cPoint2D& p) not implemented yet !! \n"; 00075 return POINT_ON; 00076 } 00077 }; 00078 00079 /*************************************************************************************************/ 00081 00083 class cArea_Describer 00084 { 00085 public: 00086 inline cArea_Describer() { Id=-1;} 00087 inline cArea_Describer(int id) { Id=id;} 00088 inline Get_Id() { return Id; } 00089 private: 00090 int Id; 00091 }; 00092 00093 00094 #endif