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

Method draw

source/MRViewer/MRViewportCornerController.cpp:842–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840}
841
842void CornerControllerObject::draw( const Viewport& vp, const AffineXf3f& rotXf, const AffineXf3f& vpInvXf )
843{
844 if ( !rootObj_ || !rootObj_->isVisible( vp.id ) )
845 return;
846 const auto& childern = rootObj_->children();
847 auto arrowsXf = rotXf * vpInvXf;
848 for ( int i = 0; i < childern.size(); ++i )
849 {
850 const auto& xf = i == 0 || i == 3 ? rotXf : arrowsXf;
851 childern[i]->setXf( xf, vp.id );
852 if ( !childern[i]->isVisible( vp.id ) )
853 continue;
854 if ( auto visObj = childern[i]->asType<VisualObject>() )
855 vp.drawOrthoFixedPos( *visObj, xf, DepthFunction::Always );
856 }
857 // second pass
858 for ( const auto& child : childern )
859 {
860 if ( !child->isVisible( vp.id ) )
861 continue;
862 if ( auto visObj = child->asType<VisualObject>() )
863 vp.drawOrthoFixedPos( *visObj, visObj->xf( vp.id ) );
864 }
865}
866
867bool CornerControllerObject::getRedrawFlag( ViewportMask mask ) const
868{

Callers

nothing calls this directly

Calls 5

isVisibleMethod · 0.80
drawOrthoFixedPosMethod · 0.80
sizeMethod · 0.45
setXfMethod · 0.45
xfMethod · 0.45

Tested by

no test coverage detected