|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "VoronoiMap/InterfaceElements.h"
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
/*@class: CPointSubset
|
|
|
|
|
|
* @desc: <EFBFBD><EFBFBD><EFBFBD>ڶԵ㼯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD><EFBFBD>
|
|
|
|
|
|
ʹ<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
1. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> vector<CPointXYZ> vecpts;
|
|
|
|
|
|
std::vector<int> idxReserved;
|
|
|
|
|
|
CPointSubset subset;
|
|
|
|
|
|
2.vecpts<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
3. <EFBFBD><EFBFBD><EFBFBD><EFBFBD>subset.CreateSubsetWithMinDist( 150.0, idxReserved);
|
|
|
|
|
|
|
|
|
|
|
|
ʹ<EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
* @date: 2023.5.24
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
class CPointSubset
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CPointSubset(void);
|
|
|
|
|
|
~CPointSubset(void);
|
|
|
|
|
|
//<2F><><EFBFBD>ļ<EFBFBD><C4BC>ж<EFBFBD>ȡɢ<C8A1><C9A2>
|
|
|
|
|
|
int ReadPoints(CString strXyz);
|
|
|
|
|
|
//<2F><><EFBFBD>ڴ<EFBFBD><DAB4>ж<EFBFBD>ȡɢ<C8A1><C9A2>
|
|
|
|
|
|
int ReadPoints(std::vector<CPointXYZ>& vecXyz);
|
|
|
|
|
|
//ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD><CFA1><EFBFBD>ݣ<EFBFBD> <20><><EFBFBD>ɵ<EFBFBD><C9B5>Ӽ<EFBFBD><D3BC><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fMinDist ,idxReserved = <20><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
//idxRemoved = <20>Ƴ<EFBFBD><C6B3>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int CreateSubsetWithMinDist(float fMinDist, std::vector<int>& idxReserved,
|
|
|
|
|
|
std::vector<int>* idxRemoved = nullptr);
|
|
|
|
|
|
//<2F>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>㼯<EFBFBD><E3BCAF><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
int WritePoints(CString fname,std::vector<int>& idxReserved);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><>ϡ<EFBFBD><CFA1><EFBFBD><EFBFBD> xyz <20>б<EFBFBD>
|
|
|
|
|
|
const std::vector<CPointXYZ> &points() { return m_points; }
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
void GetExtremeValues(void); //<2F><>ȡɢ<C8A1>㼫ֵ
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<CPointXYZ> m_points;
|
|
|
|
|
|
double m_xmin; //x<><78>С
|
|
|
|
|
|
double m_xmax; //x<><78><EFBFBD><EFBFBD>
|
|
|
|
|
|
double m_ymin; //y<><79>С
|
|
|
|
|
|
double m_ymax; //y<><79><EFBFBD><EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
|