Open PaperOpt
OpenPaperOpt/DistributionThreeDimensionBSP.h
Go to the documentation of this file.
00001 #ifndef DISTRIBUTIONTHREEDIMENSIONBSP_H
00002 #define DISTRIBUTIONTHREEDIMENSIONBSP_H
00003 
00004 #include "utilities.h"
00009 namespace Distributions{
00010         
00011         class DistributionThreeDimensionBSP{
00012         
00013         public:
00014                 DistributionThreeDimensionBSP();
00015                 DistributionThreeDimensionBSP(float height,ZDist* zd);
00016                 DistributionThreeDimensionBSP(int dir,ZDist* zd,DistributionThreeDimensionBSP* p1,DistributionThreeDimensionBSP* p2);
00017                 
00018                 void destroy_all();
00019                 void Build3dPatchset(int FillBorders,float minx,float maxx,float miny,float maxy,
00020                          double** x,double** y,double** z,int* count);
00021                 
00022                 float    GetHeight()   {return Height;}
00023                 int      GetSplitDir() {return SplitDir&3;}
00024                 
00025                 DistributionThreeDimensionBSP* GetP1()       {return P1;}
00026                 DistributionThreeDimensionBSP* GetP2()       {return P2;}
00027 
00028         //      int GetDataSize();
00029                 
00030                 void   SetZDist(ZDist* zd) {SplitDir=SplitDir|((int)zd);}
00031                 ZDist* GetZDist()    const {return (ZDist*)(SplitDir&0xfffffffc);}
00032 
00033         private:
00034                 
00035                 int      SplitDir; //Low 2 bits: 0-None,1-X,2-Y. High bits=pointer to curl-dist
00036                 float    Height;
00037                 DistributionThreeDimensionBSP* P1;
00038                 DistributionThreeDimensionBSP* P2;
00039         };
00040 }
00041 
00042 #endif