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

Function getFeatureDirection

source/MRMesh/MRFeatureHelpers.cpp:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56std::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

Callers

nothing calls this directly

Calls 2

forEachObjectKindFunction · 0.85
getDirectionMethod · 0.45

Tested by

no test coverage detected