The central classes of the library.
More...
|
enum class | OpType { Add
, Subtract
, Intersect
} |
|
The central classes of the library.
◆ OpType
Boolean operation type: Add (Union), Subtract (Difference), and Intersect.
◆ LevelSet()
Constructs a level-set Mesh from the input Signed-Distance Function (SDF). This uses a form of Marching Tetrahedra (akin to Marching Cubes, but better for manifoldness). Instead of using a cubic grid, it uses a body-centered cubic grid (two shifted cubic grids). This means if your function's interior exceeds the given bounds, you will see a kind of egg-crate shape closing off the manifold, which is due to the underlying grid.
- Parameters
-
sdf | The signed-distance functor, containing this function signature: float operator()(glm::vec3 point) , which returns the signed distance of a given point in R^3. Positive values are inside, negative outside. |
bounds | An axis-aligned box that defines the extent of the grid. |
edgeLength | Approximate maximum edge length of the triangles in the final result. This affects grid spacing, and hence has a strong effect on performance. |
level | You can inset your Mesh by using a positive value, or outset it with a negative value. |
canParallel | Parallel policies violate will crash language runtimes with runtime locks that expect to not be called back by unregistered threads. This allows bindings use LevelSet despite being compiled with MANIFOLD_PAR active. |
- Returns
- Mesh This class does not depend on Manifold, so it just returns a Mesh, but it is guaranteed to be manifold and so can always be used as input to the Manifold constructor for further operations.