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

Function computeGradient

source/MRMesh/MRSurfacePath.cpp:19–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17{
18
19static Vector3f computeGradient( const Vector3f & b, const Vector3f & c, float vb, float vc )
20{
21 auto grad = gradientInTri( Vector3d( b ), Vector3d( c ), double( vb ), double( vc ) );
22 return grad.has_value() ? Vector3f{ *grad } : Vector3f{};
23}
24
25/// given triangle with scalar field increasing in the direction \param dir;
26/// returns true if the field increases inside the triangle from the edge 01

Callers 2

findSteepestDescentPointFunction · 0.85
findExtremeEdgesFunction · 0.85

Calls 1

gradientInTriFunction · 0.85

Tested by

no test coverage detected