| 54 | } |
| 55 | |
| 56 | std::optional <Vector3f> getFeatureDirection( FeatureObject* feature ) |
| 57 | { |
| 58 | std::optional <Vector3f> direction; |
| 59 | [[maybe_unused]] bool ok = forEachObjectKind( [&] ( auto thisKind ) |
| 60 | { |
| 61 | if constexpr ( HasGetDirectionMethod<typename ObjKindTraits<thisKind.value>::type> ) |
| 62 | { |
| 63 | auto obj = dynamic_cast< typename ObjKindTraits<thisKind.value>::type* >( feature ); |
| 64 | if ( obj ) |
| 65 | { |
| 66 | direction = obj->getDirection(); |
| 67 | return true; |
| 68 | } |
| 69 | } |
| 70 | return false; |
| 71 | } ); |
| 72 | return direction; |
| 73 | } |
| 74 | |
| 75 | } // namespace MR |
nothing calls this directly
no test coverage detected