| 584 | } |
| 585 | |
| 586 | Box3f 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 | |
| 602 | size_t ObjectMeshHolder::numSelectedFaces() const |
| 603 | { |
nothing calls this directly
no test coverage detected