MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00006 00011 //---------------------------------------------------------------------------------- 00012 00013 00014 00015 #ifndef __MinimalDistancePointClouds_H 00016 #define __MinimalDistancePointClouds_H 00017 00018 00019 #include "../MLPointCloudUtilsSystem.h" 00020 00021 #include "mlVector3.h" 00022 00023 00024 ML_START_NAMESPACE 00025 00026 class TileSphere; 00027 class TileSphereHashTable; 00028 00032 class MLPOINTCLOUDUTILS_EXPORT MinimalDistancePointClouds 00033 { 00034 00035 public: 00036 00038 MinimalDistancePointClouds(); 00040 virtual ~MinimalDistancePointClouds(); 00041 00043 void setPointSets(const std::vector<ml::Vector3>& pointCloud1, const std::vector<ml::Vector3>& pointCloud2); 00046 void setFirstPointSet(const std::vector<ml::Vector3>& pointCloud); 00049 void setFirstSinglePoint(const ml::Vector3& point); 00050 00051 00055 void setNumEntries(int entries); 00057 void setParams(int entries, int partition); 00059 void setError(float error); 00060 00063 void computeDistance(float* &point1, float* &point2); 00066 void computeDistance(ml::Vector3& point1, ml::Vector3& point2); 00067 00068 00070 int getUniqueIndex(); 00072 TileSphereHashTable* getHashTable(); 00073 00075 void verbose(bool onOff); 00076 00077 00078 private: 00079 00081 float* _pointSet1; 00083 float* _pointSet2; 00085 int _size1, _size2; 00087 unsigned int _sphereIndex; 00089 TileSphereHashTable* _hashTable; 00090 00092 TileSphere* _tileSphere1; 00094 TileSphere* _tileSphere2; 00095 00097 float _error; 00098 00100 bool _verbose; 00101 00103 int _entries, _partition; 00104 00106 TileSphere* generateTree(float* pointSet, long size); 00107 00109 void getBB(float* pointSet, long size, float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ); 00110 }; 00111 00112 ML_END_NAMESPACE 00113 00114 #endif // __MinimalDistancePointClouds_H 00115