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

Method update_

source/MRViewer/MRRenderLabelObject.cpp:439–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439void RenderLabelObject::update_()
440{
441 auto objDirty = objLabel_->getDirtyFlags();
442 dirty_ |= objDirty;
443
444 if ( dirty_ & DIRTY_FACE )
445 {
446 dirtyBg_ = true;
447 dirtyLLine_ = true;
448 if ( auto mesh = objLabel_->labelRepresentingMesh() )
449 meshBox_ = mesh->getBoundingBox();
450 }
451
452 const auto position = objLabel_->getLabel().position;
453 if ( position != positionState_ )
454 {
455 positionState_ = position;
456
457 dirtySrc_ = true;
458 }
459
460 const auto pivotPoint = objLabel_->getPivotPoint();
461 if ( pivotPoint != pivotPointState_ || dirty_ & DIRTY_POSITION )
462 {
463 pivotPointState_ = pivotPoint;
464
465 dirtyLLine_ = true;
466 }
467
468 const auto backgroundPadding = objLabel_->getBackgroundPadding();
469 if ( backgroundPadding != backgroundPaddingState_ )
470 {
471 backgroundPaddingState_ = backgroundPadding;
472
473 dirtyBg_ = true;
474 dirtyLLine_ = true;
475 }
476
477 objLabel_->resetDirty();
478}
479
480RenderBufferRef<Vector3i> RenderLabelObject::loadFaceIndicesBuffer_()
481{

Callers

nothing calls this directly

Calls 2

resetDirtyMethod · 0.80
getBoundingBoxMethod · 0.45

Tested by

no test coverage detected