MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / getWorldBox

Method getWorldBox

source/MRMesh/MRObjectMeshHolder.cpp:586–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586Box3f ObjectMeshHolder::getWorldBox( ViewportId id ) const
587{
588 if ( !data_.mesh )
589 return {};
590 bool isDef = true;
591 const auto worldXf = this->worldXf( id, &isDef );
592 if ( isDef )
593 id = {};
594 auto & cache = worldBox_[id];
595 if ( auto v = cache.get( worldXf ) )
596 return *v;
597 const auto box = worldXf == AffineXf3f{} ? getBoundingBox() : data_.mesh->computeBoundingBox( &worldXf );
598 cache.set( worldXf, box );
599 return box;
600}
601
602size_t ObjectMeshHolder::numSelectedFaces() const
603{

Callers

nothing calls this directly

Calls 5

getBoundingBoxFunction · 0.85
worldXfMethod · 0.80
getMethod · 0.45
computeBoundingBoxMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected