You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//<2F>ļ<EFBFBD> CurveRedundant.h
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#ifndef AFX_EXT_CLASS
|
|
|
|
|
|
#define AFX_EXT_CLASS Q_DECL_IMPORT
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#include "mycurve.h"
|
|
|
|
|
|
namespace NVoronoi
|
|
|
|
|
|
{
|
|
|
|
|
|
class AFX_EXT_CLASS CCurveRedundant
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CCurveRedundant(void);
|
|
|
|
|
|
CCurveRedundant(CMyCurve& curve);
|
|
|
|
|
|
CCurveRedundant(double *x, double *y, double *z, double *l, int num);
|
|
|
|
|
|
virtual ~CCurveRedundant(void);
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
void Execute(double error);
|
|
|
|
|
|
|
|
|
|
|
|
bool GetEqualIntervalCurve(double interval, CMyCurve& curDest);
|
|
|
|
|
|
int GetRedundantCurve(CMyCurve& curve);
|
|
|
|
|
|
int GetCount();
|
|
|
|
|
|
double x(int nIndex);
|
|
|
|
|
|
double y(int nIndex);
|
|
|
|
|
|
double z(int nIndex);
|
|
|
|
|
|
double l(int nIndex);
|
|
|
|
|
|
void SetCurve(CMyCurve& curve);
|
|
|
|
|
|
void Clear(void);
|
|
|
|
|
|
|
|
|
|
|
|
BOOL IsRedundant(void); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD>
|
|
|
|
|
|
int GetRealIndex(int nIndex); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD><C5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void SetRealIndex(int nIndex, int nReadIndex); //<2F><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void AddRealIndex(int nRealIndex); //<2F><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
BOOL bNewCurve;
|
|
|
|
|
|
double MinDistance;
|
|
|
|
|
|
void GetNewPoint(int n1, int n2);
|
|
|
|
|
|
void CloneData(double *newx, double *newy, double *newz, double *newl);
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
static int CompareInt(const void *e1, const void * e2);
|
|
|
|
|
|
int mark_num;
|
|
|
|
|
|
int *mark;
|
|
|
|
|
|
CMyCurve *m_pCurve;
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|