Lagrange
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
mesh_to_volume.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/mesh_to_volume.h>
19#endif
20
21namespace lagrange::volume {
22
27{
32 enum class Sign {
33 FloodFill,
34 WindingNumber,
35 };
36
39 double voxel_size = -0.01;
40
43};
44
58template <typename GridScalar = float, typename Scalar, typename Index>
59auto mesh_to_volume(const SurfaceMesh<Scalar, Index>& mesh, const MeshToVolumeOptions& options = {})
60 -> typename Grid<GridScalar>::Ptr;
61
62} // namespace lagrange::volume
Mesh to volume conversion options.
Definition: mesh_to_volume.h:27
Sign signing_method
Method used to compute the sign of the distance field that determines interior voxels.
Definition: mesh_to_volume.h:42
double voxel_size
Grid voxel size.
Definition: mesh_to_volume.h:39
Sign
Available methods to compute the sign of the distance field (i.e.
Definition: mesh_to_volume.h:32
@ FloodFill
Default voxel flood-fill method used by OpenVDB.