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

Method setActiveLineFromPoints_

source/MRViewer/MRObjectTransformWidget.cpp:919–941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919void TransformControls::setActiveLineFromPoints_( const Contour3f& points )
920{
921 auto activePolyline = std::make_shared<Polyline3>();
922 activePolyline->addFromPoints( points.data(), points.size(), false );
923 activeLine_->setPolyline( activePolyline );
924 activeLine_->setVisible( true, getViewerInstance().viewport().id );
925 auto disableBlackLinesIfNeeded = [&] ( auto& obj )
926 {
927 if ( !getPickThrough() || obj->getFrontColor( false ) == params_.helperLineColor )
928 obj->setVisible( false );
929 else
930 {
931 auto color = 0.5f * params_.helperLineColor + 0.5f * params_.activeLineColor;
932 color.a = 255;
933 obj->setFrontColor( color, false );
934 obj->setLineWidth( 1.0f );
935 }
936 };
937 for ( auto& obj : translateLines_ )
938 disableBlackLinesIfNeeded( obj );
939 for ( auto& obj : rotateLines_ )
940 disableBlackLinesIfNeeded( obj );
941}
942
943void ITransformControls::setCenter( const Vector3f& center )
944{

Callers

nothing calls this directly

Calls 8

getPickThroughFunction · 0.85
addFromPointsMethod · 0.80
setPolylineMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
setVisibleMethod · 0.45
setFrontColorMethod · 0.45
setLineWidthMethod · 0.45

Tested by

no test coverage detected