Initial
This commit is contained in:
106
engine/POLYGON.BAK
Normal file
106
engine/POLYGON.BAK
Normal file
@@ -0,0 +1,106 @@
|
||||
#ifndef _ENGINE_POLYGON3D_HPP_
|
||||
#define _ENGINE_POLYGON3D_HPP_
|
||||
#ifndef _COMMON_GDIPOINT_HPP_
|
||||
#include <common/gdipoint.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
#ifndef _ENGINE_LINE3D_HPP_
|
||||
#include <engine/line3d.hpp>
|
||||
#endif
|
||||
#ifndef _ENGINE_LINE2D_HPP_
|
||||
#include <engine/line2d.hpp>
|
||||
#endif
|
||||
|
||||
class Polygon3D : public Block<Line3D>, public Block<Line2D>
|
||||
{
|
||||
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<Line3D> &someLine3DBlock);
|
||||
void insert(Block<Line2D> &someLine2DBlock);
|
||||
void insert(const Line2D *pLine2D);
|
||||
Polygon3D &operator+=(const Block<Line3D> &someLine3DBlock);
|
||||
};
|
||||
|
||||
inline
|
||||
Polygon3D::Polygon3D(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
Polygon3D::Polygon3D(const Polygon3D &somePolygon3D)
|
||||
: Block<Line3D>(somePolygon3D), Block<Line2D>(somePolygon3D)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
Polygon3D::~Polygon3D()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
Polygon3D &Polygon3D::operator=(const Polygon3D &somePolygon3D)
|
||||
{
|
||||
(Block<Line3D>&)*this=(Block<Line3D>&)somePolygon3D;
|
||||
(Block<Line2D>&)*this=(Block<Line2D>&)somePolygon3D;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
Polygon3D &Polygon3D::operator+=(const Block<Line3D> &someLine3DBlock)
|
||||
{ // private implementation
|
||||
(Block<Line3D>&)*this+=someLine3DBlock;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
void Polygon3D::insert(const Polygon3D *pPolygon3D)
|
||||
{
|
||||
Block<Line3D>::insert((Block<Line3D>&)*pPolygon3D);
|
||||
Block<Line2D>::insert((Block<Line2D>&)*pPolygon3D);
|
||||
}
|
||||
|
||||
inline
|
||||
void Polygon3D::insert(const Line3D *pLine3D)
|
||||
{
|
||||
Block<Line3D>::insert(pLine3D);
|
||||
Block<Line2D>::insert(&Line2D());
|
||||
}
|
||||
|
||||
inline
|
||||
void Polygon3D::insert(Block<Line3D> &/*someLine3DBlock*/)
|
||||
{ // private implementation
|
||||
}
|
||||
|
||||
inline
|
||||
void Polygon3D::insert(Block<Line2D> &/*someLine2DBlock*/)
|
||||
{ // private implementation
|
||||
}
|
||||
|
||||
inline
|
||||
void Polygon3D::insert(const Line2D * /*pLine2D*/)
|
||||
{ // private implementation
|
||||
}
|
||||
|
||||
inline
|
||||
void Polygon3D::remove(void)
|
||||
{
|
||||
Block<Line3D>::remove();
|
||||
Block<Line2D>::remove();
|
||||
}
|
||||
|
||||
inline
|
||||
LONG Polygon3D::size(void)const
|
||||
{
|
||||
return Block<Line3D>::size();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user