|
Signed Distance Fields 1.0
|
Implementation of the Sphere Carving algorithm. More...
#include <spherecarving.h>
Public Member Functions | |
| SphereCarving (SDFTree *) | |
| Initialize the sphere carving process. | |
| bool | Iterate () |
| Makes one iteration of Sphere Carving. | |
| void | CompleteCarving (double epsilon=0.1, int max_iter=20, int max_spheres=2000) |
| Loops Sphere Carving iterations until one of the stopping criteria is met. | |
| Mesh | GetConvexHull () const |
| Return the convex hull mesh of the point set, which is the minimal convex bounding volume we can produce. | |
| Mesh | GetDebugSpheres () const |
| Return the mesh of the initial 12 spheres, to check if they're covering space. | |
| std::vector< Plane > | GetBoundPlanes (int max_planes=25) const |
| Returns a set of plane/half-spaces, which intersection is bounding. | |
Protected Member Functions | |
| bool | ValidIntersectionCheck (const Vector &p, const Vec3I &spheres_id) const |
| Checks wether an intersection point is valid or not (ie. on the sphere set surface, and not inside). | |
| void | SphereSetIntersections () |
| Fill point_set with every valid intersections of the sphere_set. | |
| void | NewSpheresIntersections () |
| Updates point_set with every new valid intersections added by the new spheres. Also removes old intersections canceled by the new spheres. | |
Implementation of the Sphere Carving algorithm.
Sphere Carving: Bounding Volumes for Signed Distance Fields. H. Schott, T. Thonat, T. Lambert, E. Gu�rin, E. Galin, A. Paris. ACM Transactions on Graphics, 44(4), 2025.
| SphereCarving::SphereCarving | ( | SDFTree * | shape | ) |
Initialize the sphere carving process.
| shape | Signed distance field construction tree. |
| std::vector< Plane > SphereCarving::GetBoundPlanes | ( | int | max_planes = 25 | ) | const |
Returns a set of plane/half-spaces, which intersection is bounding.
| max_planes | Maximum number of planes that can be used. No limit if 0. |
| bool SphereCarving::Iterate | ( | ) |
Makes one iteration of Sphere Carving.
Computes new spheres and call NewSpheresIntersections to updates the point_set. Return false if no new spheres were found.
|
protected |
Checks wether an intersection point is valid or not (ie. on the sphere set surface, and not inside).
| p | Intersection point to check. |
| spheres_id | Triplet of sphere ids that produced the considered intersection point. |