Lagrange
RemeshingOptions.h
1/*
2 * Copyright 2023 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/utils/invalid.h>
15
16#include <cstddef>
17#include <vector>
18
19namespace lagrange::scene {
20
24enum class FacetAllocationStrategy {
26 EvenSplit,
28 RelativeToMeshArea,
30 RelativeToNumFacets,
35 Synchronized,
36};
37
41enum class UninstantiatedMeshesStrategy {
43 None,
45 Skip,
47 ReplaceWithEmpty,
48};
49
55{
57 FacetAllocationStrategy facet_allocation_strategy = FacetAllocationStrategy::EvenSplit;
58
61 size_t min_facets = lagrange::invalid<size_t>();
62
64 UninstantiatedMeshesStrategy uninstantiated_meshes_strategy = UninstantiatedMeshesStrategy::None;
65
67 std::vector<float> per_instance_importance;
68};
69
70} // namespace lagrange::scene
@ None
Do not reorder mesh vertices/facets.
Options that define how remeshing algorithms (tessellate, decimate, quadrangulate) treat meshes withi...
Definition: RemeshingOptions.h:55
size_t min_facets
Minimum amount of facets for meshes in the scene.
Definition: RemeshingOptions.h:61
FacetAllocationStrategy facet_allocation_strategy
Facet allocation strategy for meshes in the scene.
Definition: RemeshingOptions.h:57
UninstantiatedMeshesStrategy uninstantiated_meshes_strategy
Behavior for meshes without instances in the scene.
Definition: RemeshingOptions.h:64
std::vector< float > per_instance_importance
Optional per-instance weights/importance. Must be > 0.
Definition: RemeshingOptions.h:67