MCPcopy Create free account
hub / github.com/OctoMap/octomap / minDist

Method minDist

octomap/src/Pointcloud.cpp:194–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193
194 void Pointcloud::minDist(double thres) {
195 Pointcloud result;
196
197 float x,y,z;
198 for (Pointcloud::const_iterator it=begin(); it!=end(); it++) {
199 x = (*it)(0);
200 y = (*it)(1);
201 z = (*it)(2);
202 double dist = sqrt(x*x+y*y+z*z);
203 if ( dist > thres ) result.push_back (x,y,z);
204 } // end for points
205 this->clear();
206 this->push_back(result);
207 }
208
209
210 void Pointcloud::subSampleRandom(unsigned int num_samples, Pointcloud& sample_cloud) {

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.95
clearMethod · 0.95

Tested by

no test coverage detected