Lagrange
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
volume_to_mesh.h
1/*
2 * Copyright 2021 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/volume/types.h>
16
17#ifdef LAGRANGE_ENABLE_LEGACY_FUNCTIONS
18 #include <lagrange/volume/legacy/volume_to_mesh.h>
19#endif
20
21namespace lagrange::volume {
22
25{
26 // Value of the isosurface.
27 double isovalue = 0.0;
28
30 double adaptivity = 0.0;
31
34
36 std::string_view normal_attribute_name = "";
37};
38
50template <typename MeshType, typename GridScalar>
51auto volume_to_mesh(const Grid<GridScalar>& grid, const VolumeToMeshOptions& options = {})
53
54} // namespace lagrange::volume
A general purpose polygonal mesh class.
Definition: SurfaceMesh.h:66
Volume to mesh isosurfacing options.
Definition: volume_to_mesh.h:25
double adaptivity
Surface adaptivity threshold [0 to 1]. 0 keeps the original quad mesh, while 1 simplifies the most.
Definition: volume_to_mesh.h:30
bool relax_disoriented_triangles
Toggle relaxing disoriented triangles during adaptive meshing.
Definition: volume_to_mesh.h:33
std::string_view normal_attribute_name
If non-empty, compute vertex normals from the volume and store them in the appropriately named attrib...
Definition: volume_to_mesh.h:36