88 lines
2.3 KiB
C++
88 lines
2.3 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, SH Software Co. Ltd.
|
|
// = FileName : XDirectionCurve类
|
|
// = Version : ver2.0
|
|
// = Author : zjq
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: XDirectionCurve类声明
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _XDIRECTIONCURVE_H_
|
|
#define _XDIRECTIONCURVE_H_
|
|
|
|
#ifndef _XCURVESEGMENT_H_
|
|
#include "XCurveSegment.h"
|
|
#endif
|
|
|
|
#ifndef _XARC_H_
|
|
#include "XArc.h"
|
|
#endif
|
|
|
|
#ifndef _XPOLY2D_H_
|
|
#include "XPoly2D.h"
|
|
#endif
|
|
|
|
#ifndef _XPOINT_H_
|
|
#include "XPoint.h"
|
|
#endif
|
|
|
|
#ifndef _XPointDir2d_H_
|
|
#include "XPointDir2d.h"
|
|
#endif
|
|
|
|
class GEOAPI XDirectionCurve : public XCurveSegment
|
|
{
|
|
public:
|
|
XDirectionCurve(int flg = LS_FINITE);
|
|
XDirectionCurve(const XArc &ar, int bMinus = 0);
|
|
XDirectionCurve(const XDirectionCurve &src);
|
|
XDirectionCurve(const XPoint &spt, const XPoint &ept, ads_real dAng = 0.0, int flg = LS_FINITE);
|
|
|
|
virtual ~XDirectionCurve();
|
|
|
|
virtual int IsMinusArc() const;
|
|
|
|
// 与曲线方向有关的成员
|
|
virtual int OnWhichSide(const XPoint &src) const;
|
|
virtual int OnWhichSide1(const XPoint &src) const;
|
|
|
|
// 从端点开始沿曲线走过给定距离的点向量
|
|
virtual int Polar(ads_real nDist, XPointDir2d &res, BOOL bFromStart = TRUE) const;
|
|
|
|
virtual void Reverse();
|
|
|
|
virtual void TransUCS(ads_matrix mat);
|
|
virtual void TransUCS(const resbuf *, const resbuf *);
|
|
|
|
virtual void AsPoly2D(XPoly2D &poly) const;
|
|
|
|
virtual void SetPoints(const XPoint &ptStart, const XPoint &ptEnd);
|
|
|
|
// 端点处朝曲线段内部的方向
|
|
virtual ads_real IDirection(int pt) const;
|
|
|
|
// 取得指向内部的方向支持Line,Arc,不支持Cir。 pt--0:start; 1--end
|
|
virtual ads_real PathArea(XPoint &tmpt) const;
|
|
|
|
virtual ads_real Direction(const XPoint &pt) const;
|
|
|
|
// 求到端点的沿曲线线位移, 在线内距离为正,否则为负, 和Polar配合使用
|
|
// pt如果不在线上的话则先投影
|
|
virtual ads_real PathDistance(const XPoint &pt, BOOL bFromStart = TRUE) const;
|
|
|
|
// 求通过pt点的法向
|
|
virtual ads_real OrthoDirection(const XPoint &pt) const;
|
|
|
|
// dist left<0 / right>0
|
|
virtual XCurveSegment GetCurve() const;
|
|
virtual XDirectionCurve Offset(ads_real dist, int flg) const;
|
|
|
|
virtual bool IsDirectionCurve();
|
|
|
|
XArc GetArc() const;
|
|
};
|
|
|
|
#endif
|
|
|