📄 gispoint.h
字号:
///////////////////////////////////////////////////////////////////////////////
// This is a part of the CityStar Gis Foundation Classes C++ library.
// Copyright (C) 1996-1997 BeiDaSanQin Corporation
// All rights reserved.
//
// Create : (what) gispoint.h( header file )
// (when) 11/13/1996
// (who) WangQiang
// Update : Tian Yuan , 1997-02-20
// operator CPoint()
// m_dwTag and its operation.
///////////////////////////////////////////////////////////////////////////////
// gispoint.h : interface of the CGisPoint class
#ifndef __GIS_POINT__
#define __GIS_POINT__
///////////////////////////////////////////////////////////////////////////////
//
// CGisPoint : This class defines the geometrical substantiality object -- point
// that is compatible with the point defined in the POINT structure
// and the CPoint class in Visual C++.
class CGisPoint : public CObject
{
//member variables:
public:
DWORD m_dwTag;
public:
double x; //abscissa of point
double y; //ordinate of point
//member functions:
public:
//Constructors:
CGisPoint();
CGisPoint( const double dInitX, const double dInitY );
CGisPoint( const POINT& ptInitiation );
CGisPoint( const POINT *pInitiation );
CGisPoint( const CPoint& ptInitiation );
CGisPoint( const CPoint *pInitiation );
CGisPoint( const CGisPoint& ptInitiation );
CGisPoint( const CGisPoint *pInitiation );
//Destructor:
~CGisPoint();
//Attributes:
double GetX( ) const;
double GetY( ) const;
//Operations:
void SetPoint( const double dX,const double dY );
void SetPoint( const POINT& ptAnother );
void SetPoint( const CPoint& ptAnother );
void SetPoint( const CGisPoint& ptAnother );
double GetDistance( const POINT& ptAnother ) const;
double GetDistance( const POINT *pptAnother ) const;
double GetDistance( const CPoint& ptAnother ) const;
double GetDistance( const CPoint *pptAnother ) const;
double GetDistance( const CGisPoint& ptAnother ) const;
double GetDistance( const CGisPoint *pptAnother ) const;
BOOL EqualTo( const CGisPoint& ptAnother, double dDistance = 0.00001) const;
//operators:
BOOL operator == ( const CGisPoint& ptAnother ) const;
BOOL operator != ( const CGisPoint& ptAnother ) const;
void operator = ( const CGisPoint& ptAnother );
void operator = ( const CPoint& ptAnother );
// This group performs operations of m_dwTag.
// They are added by Tian Yuan.
};
///////////////////////////////////////////////////////////////////////////////
typedef CGisPoint* LPCGisPoint; // Long pointer to CGisPoint
///////////////////////////////////////////////////////////////////////////////
#endif //__GIS_POINT__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -