MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / distance

Function distance

Tools/VolumeSampling/main.cpp:398–404  ·  view source on GitHub ↗

Determine distance of a point x to the surface of the mesh

Source from the content-addressed store, hash-verified

396
397// Determine distance of a point x to the surface of the mesh
398double distance(const Vector3r &x, const Real tolerance)
399{
400 const double dist = distanceField->interpolate(0, x.template cast<double>());
401 if (dist == std::numeric_limits<double>::max())
402 return dist;
403 return dist - tolerance;
404}
405
406void generateSDF(SPH::TriangleMesh &mesh)
407{

Callers 9

eraseFunction · 0.85
insert_iteratorFunction · 0.85
sampleMeshMethod · 0.85
sampleObjectMethod · 0.85
stepMethod · 0.85
computePressureMethod · 0.85
stepMethod · 0.85
sampleObjectFunction · 0.85

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected