|
// Point3D.h: interface for the CPoint3D class.
//
////////////////////////////////////////////////// ////////////////////
#include <afxtempl.h>
#if !defined(AFX_POINT3D_H__FB60210D_9230_43D0_B3C5_1FA12314F579__INCLUDED_)
#define AFX_POINT3D_H__FB60210D_9230_43D0_B3C5_1FA12314F579__INCLUDED_
#if _MSC_VER> 1000
#pragma once
#endif // _MSC_VER> 1000
#define LIMITVALUE 0.0001 //×ø±êÏàµÈÏÞÖµ 2014.2.25. ËÕ¼Ó¡ £
//Èýά¿ Õ¼äµã×ø±êÀà
class CPoint3D
{
public:
CPoint3D();
CPoint3D(double x);
CPoint3D(double x,double y);
CPoint3D(double x,double y,double z);
virtual ~CPoint3D();
public:
double x;
double y;
double z;
void Maximal(CPoint3D&p);
void Minimal(CPoint3D&p);
void Maximal(double * p);
void Minimal(double * p);
virtual CPoint3D operator= (const CPoint3D&p);
virtual CPoint3D operator+ (const CPoint3D&p);
virtual CPoint3D operator- (const CPoint3D&p);
virtual CPoint3D operator* (const CPoint3D&p);
// 2014.2.25. Ëոġ £
virtual bool operator==(const CPoint3D&p);
virtual CPoint3D operator*=(const double scale);
virtual CPoint3D operator+=(const CPoint3D&p);
virtual CPoint3D operator-=(const CPoint3D&p);
virtual CPoint3D operator= (const double * p);
};
//´øÓÐÊôÐÔÂëά×ø±êµãÀà
class CCodePoint3D: public CPoint3D
{
public:
CCodePoint3D();
virtual ~CCodePoint3D();
public:
long code;
public:
virtual CCodePoint3D operator = (const CCodePoint3D&p);
CCodePoint3D *Create(long Code);
CCodePoint3D *Create(long Code,double x,double y,double z);
};
typedef CArray<CPoint3D,CPoint3D> CPoint3DArray;
typedef CArray<CCodePoint3D,CCodePoint3D> CCodePoint3DArray;
typedef struct
{
long lNo;
CPoint3DArray Point3DArray;
}POINT3DARRAY;
typedef CTypedPtrList<CPtrList, POINT3DARRAY*> CPoint3DArrayList;
#endif // !defined(AFX_POINT3D_H__FB60210D_9230_43D0_B3C5_1FA12314F579__INCLUDED_) |
|