Determine distance of a point x to the surface of the mesh
| 396 | |
| 397 | // Determine distance of a point x to the surface of the mesh |
| 398 | double 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 | |
| 406 | void generateSDF(SPH::TriangleMesh &mesh) |
| 407 | { |
no test coverage detected