//-------------------------------------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TGPoint 类 // = Version : ver2.0 // = Author : wlw // = CreateDate : 2002-09-09 // = Description: TGPoint 声明 // = Maintainers: // //-------------------------------------------------------------------------------------------------------+ #ifndef _TGPOINT_H_ #define _TGPOINT_H_ class GEOAPI TGPoint { public: TGPoint(double *p); TGPoint(float *p); TGPoint(double X = 0, double Y = 0, double Z = 0); ~TGPoint(); void operator += (const TGPoint& vt); void operator -= (const TGPoint& vt); void operator *= (double rate); void operator /= (double rate); bool operator == (const TGPoint& pt) const; bool operator != (const TGPoint& pt) const; bool operator > (const TGPoint& pt) const; bool operator < (const TGPoint& pt) const; TGPoint operator + (const TGPoint& vt) const; TGPoint operator - (const TGPoint& vt) const; TGPoint operator * (double rate) const; TGPoint operator / (double rate) const; TGPoint operator - () const; operator double*() const; double& operator[](int i); void SetPoint(double X,double Y,double Z); void SetPoint(double X,double Y); double Length2D() const; double Length3D() const; bool Equal2D(const TGPoint& pt) const; public: double x,y,z; }; #endif