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

31 lines
1.3 KiB
C++

#pragma once
#include "RoadGradeDlg.h"
class CRoadGradeStyle
{
public:
CRoadGradeStyle(void);
~CRoadGradeStyle(void);
public:
enum ReturnValue{kRetContinue, kRetEsc, kRetDynamicStyle, kRetSettingDlg};
int SelectStyle(TDbSymbArrow *pSymbArrowEnt, CRoadGradeDlg* pDlg);//选择标高进行道路坡度标注
void DynamicStyle(TDbSymbArrow *pSymbArrowEnt, CRoadGradeDlg* pDlg);//动态绘制道路坡度标注
private:
bool JudgeSelectRoadElevation(PickSet &ss);//判断选择的道路标高是否满足规定的个数
bool JudgeRoadCentersIsContinue(const PickSet &ssRoadCenter, XPoly2D &roadCenterLine2d);//判断选择道路中心线是否连续
bool JudgeElevationOnRoadCenter(const XPoly2D &roadCenterLine2d, const PickSet &ssElevations);//判断标高是否在选择的道路中心线上
void SetArrowDirection(XPoly2D &roadCenterLine2d,const PickSet &ssElevations);//设置标注方向
bool GetDistanceAndGrade(const XPoly2D &roadCenterLine2d, const PickSet &ssElevations, double &dRoadLenth, double &dRoadGrade);//获取距离和坡度
int SelectRoadCenterLine(PickSet &ssRoadCenter, XPoly2D &pCenterLine);//选择道路中心线
bool AutoCreateRoadGradeSymble(const PickSet &ssElevation, TDbSymbArrow *pSymbArrowEnt, CRoadGradeDlg* pDlg);//按直线中心点自动标注
private:
static double m_dAngle;
static double m_dRoadGrade;
static double m_dRoadLenth;
};