MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / age

Method age

apps/in_hand_scanner/src/integration.cpp:381–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379////////////////////////////////////////////////////////////////////////////////
380
381void
382pcl::ihs::Integration::age(const MeshPtr& mesh, const bool cleanup) const
383{
384 for (std::size_t i = 0; i < mesh->sizeVertices(); ++i) {
385 PointIHS& pt = mesh->getVertexDataCloud()[i];
386 if (pt.age < max_age_) {
387 // Point survives
388 ++(pt.age);
389 }
390 else if (pt.age == max_age_) // Judgement Day
391 {
392 if (pcl::ihs::countDirections(pt.directions) < min_directions_) {
393 // Point dies (no need to transform it)
394 mesh->deleteVertex(VertexIndex(i));
395 }
396 else {
397 // Point becomes immortal
398 pt.age = std::numeric_limits<unsigned int>::max();
399 }
400 }
401 }
402
403 if (cleanup) {
404 mesh->cleanUp();
405 }
406}
407
408////////////////////////////////////////////////////////////////////////////////
409

Callers 2

computationThreadMethod · 0.80
newDataCallbackMethod · 0.80

Calls 5

sizeVerticesMethod · 0.80
getVertexDataCloudMethod · 0.80
deleteVertexMethod · 0.80
cleanUpMethod · 0.80
maxFunction · 0.50

Tested by

no test coverage detected