29class MinimalDistancePointClouds;
51 void setBB(
float minX,
float maxX,
float minY,
float maxY,
float minZ,
float maxZ);
67 void getStatistics(
int &_treeDepth,
int &usedSpheres,
int &leafSpheres,
int &_maxEnt);
80 unsigned int _sphereIndex;
86 bool _hasSubSpheresFlag;
88 unsigned int _partition;
90 unsigned int _cubicPartition;
96 unsigned int _numEntries;
101 float _minX, _maxX, _minY, _maxY, _minZ, _maxZ;
108 void _getBB(
float& minX,
float& maxX,
float& minY,
float& maxY,
float& minZ,
float& maxZ);
110 float* _getPosition();
114 void _getSubset(
float** &subset,
int &size);
116 bool _hasSubSpheres();
128 inline float _distance(
const float* point1,
const float* point2)
130 const float d1 = * point1 - * point2;
131 const float d2 = *(point1 + 1) - *(point2 + 1);
132 const float d3 = *(point1 + 2) - *(point2 + 2);
133 return sqrtf(d1*d1 + d2*d2 + d3*d3);
137 inline float _fastDistance(
const float* point1,
const float* point2)
139 const float d1 = * point1 - * point2;
140 const float d2 = *(point1 + 1) - *(point2 + 1);
141 const float d3 = *(point1 + 2) - *(point2 + 2);
142 return (d1*d1 + d2*d2 + d3*d3);
void setBB(float minX, float maxX, float minY, float maxY, float minZ, float maxZ)
Defines which points will be put into this sphere.
float computeDistance(TileSphere *tileSphere, float *&point1, float *&point2)
Computes the distance and returns references to the nearest points of both sets.
virtual ~TileSphere()
Destructor.
TileSphere()
Default Constructor.
void getDeFactoSize()
Computes the optimal bounding sphere.
void addPoint(float *position)
Put a point into this sphere (or one of its sub spheres).
unsigned int getSphereIndex()
Returns the index of the TileSphere.
TileSphere(MinimalDistancePointClouds *minimalDistance, int maxPartition=2, int numElements=1103, float error=0)
Constructor with a pointer on the main class and presets for the distance computation.
void getStatistics(int &_treeDepth, int &usedSpheres, int &leafSpheres, int &_maxEnt)
Returns statistics for debugging purposes.
void setParameter(MinimalDistancePointClouds *minimalDistance, int maxPartition, int numElements, float error)
Must be called, when TileSphere was instantiated with the default constructor.
float computeDistance(TileSphere *tileSphere, unsigned int &node1, unsigned int &nodet2)
Computes the distance and returns a references to the entryNumbers of the nearest nodes of both sets.