| 351 | } |
| 352 | |
| 353 | void addLabel( ObjectMesh& obj, const std::string& str, const Vector3f& pos, bool depthTest ) |
| 354 | { |
| 355 | auto label = std::make_shared<ObjectLabel>(); |
| 356 | label->setFrontColor( Color::white(), false ); |
| 357 | label->setLabel( { str, pos } ); |
| 358 | label->setPivotPoint( Vector2f( 0.5f, 0.5f ) ); |
| 359 | label->setVisualizeProperty( depthTest, VisualizeMaskType::DepthTest, ViewportMask::all() ); |
| 360 | float fontSize = 20.0f; |
| 361 | if ( auto menu = getViewerInstance().getMenuPlugin() ) |
| 362 | fontSize *= menu->menuScaling(); |
| 363 | label->setFontHeight( fontSize ); |
| 364 | obj.addChild( label ); |
| 365 | } |
| 366 | |
| 367 | int launchDefaultViewer( const Viewer::LaunchParams& params, const ViewerSetup& setup ) |
| 368 | { |
no test coverage detected