#ifndef _ENGINE_POLYGON3D_HPP_ #define _ENGINE_POLYGON3D_HPP_ #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _ENGINE_LINE3D_HPP_ #include #endif #ifndef _ENGINE_LINE2D_HPP_ #include #endif class Polygon3D : public Block, public Block { public: Polygon3D(void); Polygon3D(const Polygon3D &somePolygon3D); virtual ~Polygon3D(); Polygon3D &operator=(const Polygon3D &somePolygon3D); void insert(const Line3D *pLine3D); void remove(void); LONG size(void)const; private: void insert(const Polygon3D *pPolygon3D); void insert(Block &someLine3DBlock); void insert(Block &someLine2DBlock); void insert(const Line2D *pLine2D); Polygon3D &operator+=(const Block &someLine3DBlock); }; inline Polygon3D::Polygon3D(void) { } inline Polygon3D::Polygon3D(const Polygon3D &somePolygon3D) : Block(somePolygon3D), Block(somePolygon3D) { } inline Polygon3D::~Polygon3D() { } inline Polygon3D &Polygon3D::operator=(const Polygon3D &somePolygon3D) { (Block&)*this=(Block&)somePolygon3D; (Block&)*this=(Block&)somePolygon3D; return *this; } inline Polygon3D &Polygon3D::operator+=(const Block &someLine3DBlock) { // private implementation (Block&)*this+=someLine3DBlock; return *this; } inline void Polygon3D::insert(const Polygon3D *pPolygon3D) { Block::insert((Block&)*pPolygon3D); Block::insert((Block&)*pPolygon3D); } inline void Polygon3D::insert(const Line3D *pLine3D) { Block::insert(pLine3D); Block::insert(&Line2D()); } inline void Polygon3D::insert(Block &/*someLine3DBlock*/) { // private implementation } inline void Polygon3D::insert(Block &/*someLine2DBlock*/) { // private implementation } inline void Polygon3D::insert(const Line2D * /*pLine2D*/) { // private implementation } inline void Polygon3D::remove(void) { Block::remove(); Block::remove(); } inline LONG Polygon3D::size(void)const { return Block::size(); } #endif