| 12 | { |
| 13 | |
| 14 | void 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 | |
| 31 | void DirectionWidget::create( const Vector3f& worldDir, const Vector3f& worldBase, float worldLength, OnDirectionChangedCallback onDirectionChanged, Object* parent ) |
| 32 | { |
no test coverage detected