Files
envi-code/SourceCode/Code2026/tg_shs/inc/subgeo/TPGeEllipse.h
T
2026-09-28 15:28:50 +08:00

55 lines
1.1 KiB
C++

//-------------------------------------------------------------------------------------------------------+
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
// = FileName : TPGeEllipse Àà
// = Version : ver2.0
// = Author : wlw
// = CreateDate : 2002-09-09
// = Description: TPGeEllipse ÉùÃ÷ ·½³Ì:x=center.x+aRadius*cos(t);y=center.y+bRadius*sin(t)
// = Maintainers:
//
//-------------------------------------------------------------------------------------------------------+
#ifndef _TPGEELLIPSE_H_
#define _TPGEELLIPSE_H_
#ifndef _TGPOINT_H_
#include "TGPoint.h"
#endif
#ifndef _TWFLAG_H_
#include "TWFlag.h"
#endif
class GEOAPI TPGeEllipse
{
public:
TPGeEllipse();
TPGeEllipse(const TGPoint& pt,double aRadius,double bRadius);
virtual ~TPGeEllipse();
bool operator == (const TPGeEllipse& e) const;
bool operator != (const TPGeEllipse& e) const;
bool IsValid() const;
bool IsCircle() const;
GRelation HitTest(const TGPoint& pt) const;
void Pt2Pa(const TGPoint& pt,double& pa) const;
void Pa2Pt(double pa,TGPoint& pt) const;
public:
TGPoint center;
double a,b;
};
#endif