-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkdNode.h
32 lines (24 loc) · 862 Bytes
/
kdNode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include "conf.h"
#include <vector>
#include <simMath/3Vector.h>
struct SKdPt {
C3Vector pt;
bool ignorePt;
unsigned char rgb[3];
};
class CKdNode
{
public:
CKdNode();
CKdNode(std::vector<SKdPt>& pts,const std::vector<int>& selectedPts,double proximityTol,int axis);
virtual ~CKdNode();
static CKdNode* buildKdTree(const double* pts,size_t ptCnt,const unsigned char* rgbData,bool rgbForEachPt,double proximityTol);
void getPts(std::vector<double>& pts,std::vector<unsigned char>& rgbs);
void _populateNode(std::vector<SKdPt>& pts,const std::vector<int>& selectedPts,double proximityTol,int axis);
void _disableClosePts(std::vector<SKdPt>& pts,const std::vector<int>& selectedPts,double proximityTol,int axis);
CKdNode* kdNodes[2];
C3Vector pt;
bool ptIsValid;
unsigned char rgb[3];
};