Lagrange
Loading...
Searching...
No Matches
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,
34 Synchronized,
35};
36
40enum class UninstantiatedMeshesStrategy {
42 None,
44 Skip,
46 ReplaceWithEmpty,
47};
48
54{
56 FacetAllocationStrategy facet_allocation_strategy = FacetAllocationStrategy::EvenSplit;
57
61
63 UninstantiatedMeshesStrategy uninstantiated_meshes_strategy =
64 UninstantiatedMeshesStrategy::None;
65
67 std::vector<float> per_instance_importance;
68};
69
70} // namespace lagrange::scene
constexpr T invalid()
You can use invalid<T>() to get a value that can represent "invalid" values, such as invalid indices ...
Definition invalid.h:40
Options that define how remeshing algorithms (tessellate, decimate, quadrangulate) treat meshes withi...
Definition RemeshingOptions.h:54
size_t min_facets
Minimum amount of facets for meshes in the scene.
Definition RemeshingOptions.h:60
FacetAllocationStrategy facet_allocation_strategy
Facet allocation strategy for meshes in the scene.
Definition RemeshingOptions.h:56
UninstantiatedMeshesStrategy uninstantiated_meshes_strategy
Behavior for meshes without instances in the scene.
Definition RemeshingOptions.h:63
std::vector< float > per_instance_importance
Optional per-instance weights/importance. Must be > 0.
Definition RemeshingOptions.h:67