Lagrange
combine_meshes.h
1/*
2 * Copyright 2022 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/utils/function_ref.h>
16#include <lagrange/utils/span.h>
17
18#include <initializer_list>
19
20namespace lagrange {
21
29
41template <typename Scalar, typename Index>
43 std::initializer_list<const SurfaceMesh<Scalar, Index>*> meshes,
44 bool preserve_attributes = true);
45
59template <typename Scalar, typename Index>
61 span<const SurfaceMesh<Scalar, Index>> meshes,
62 bool preserve_attributes = true);
63
79template <typename Scalar, typename Index>
81 size_t num_meshes,
82 function_ref<const SurfaceMesh<Scalar, Index>&(size_t)> get_mesh,
83 bool preserve_attributes = true);
84
86
87} // namespace lagrange
A general purpose polygonal mesh class.
Definition: SurfaceMesh.h:66
SurfaceMesh< Scalar, Index > combine_meshes(std::initializer_list< const SurfaceMesh< Scalar, Index > * > meshes, bool preserve_attributes=true)
Combine multiple meshes into a single mesh.
Definition: combine_meshes.cpp:295
function_ref(R(*)(Args...)) -> function_ref< R(Args...)>
Deduce function_ref type from a function pointer.
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition: span.h:27
Main namespace for Lagrange.
Definition: AABBIGL.h:30