| 12 | { |
| 13 | |
| 14 | PickedPoint pointOnObjectToPickedPoint( const VisualObject* object, const PointOnObject& pos ) |
| 15 | { |
| 16 | if ( auto* objMesh = dynamic_cast< const ObjectMeshHolder* >( object ) ) |
| 17 | return objMesh->mesh()->toTriPoint( pos ); |
| 18 | |
| 19 | if ( dynamic_cast< const ObjectPointsHolder* >( object ) ) |
| 20 | return pos.vert; |
| 21 | |
| 22 | if ( auto* objLines = dynamic_cast< const ObjectLinesHolder* >( object ) ) |
| 23 | return objLines->polyline()->toEdgePoint( EdgeId( pos.uedge ), pos.point ); |
| 24 | |
| 25 | assert( false ); |
| 26 | return {}; |
| 27 | } |
| 28 | |
| 29 | std::optional<Vector3f> getPickedPointPosition( const VisualObject& object, const PickedPoint& point ) |
| 30 | { |
no test coverage detected