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

Method create

source/MRViewer/MRDirectionWidget.cpp:14–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12{
13
14void DirectionWidget::create( Object* parent )
15{
16 reset();
17 connect( &getViewerInstance(), 10, boost::signals2::at_front );
18
19 std::shared_ptr<Mesh> mesh = std::make_shared<Mesh>( makeArrow( {}, Vector3f::plusZ(), 0.02f, 0.04f, 0.08f ) );
20 directionObj_ = std::make_shared<ObjectMesh>();
21 directionObj_->setMesh( mesh );
22 directionObj_->setAncillary( true );
23 directionObj_->setFrontColor( color_, false );
24 directionObj_->setFlatShading( true );
25
26 if ( !parent )
27 parent = &SceneRoot::get();
28 parent->addChild( directionObj_ );
29}
30
31void DirectionWidget::create( const Vector3f& worldDir, const Vector3f& worldBase, float worldLength, OnDirectionChangedCallback onDirectionChanged, Object* parent )
32{

Callers 2

addSubfeaturesFunction · 0.45
createPickWidget_Method · 0.45

Calls 6

makeArrowFunction · 0.85
setMeshMethod · 0.80
setAncillaryMethod · 0.80
addChildMethod · 0.80
getFunction · 0.50
setFrontColorMethod · 0.45

Tested by

no test coverage detected