Lagrange
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
get_uv_attribute.h
1/*
2 * Copyright 2025 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 * Copyright 2025 Adobe. All rights reserved.
15 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16 * you may not use this file except in compliance with the License. You may obtain a copy
17 * of the License at http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software distributed under
20 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21 * OF ANY KIND, either express or implied. See the License for the specific language
22 * governing permissions and limitations under the License.
23 */
24
25#include <lagrange/SurfaceMesh.h>
26#include <lagrange/views.h>
27
28#include <string_view>
29#include <tuple>
30
31namespace lagrange::internal {
32
42template <typename Scalar, typename Index>
45 std::string_view uv_attribute_name = "");
46
55template <typename Scalar, typename Index>
56std::tuple<ConstRowMatrixView<Scalar>, ConstRowMatrixView<Index>> get_uv_attribute(
58 std::string_view uv_attribute_name = "");
59
68template <typename Scalar, typename Index>
69std::tuple<RowMatrixView<Scalar>, RowMatrixView<Index>> ref_uv_attribute(
71 std::string_view uv_attribute_name = "");
72
73} // namespace lagrange::internal
A general purpose polygonal mesh class.
Definition: SurfaceMesh.h:66
uint32_t AttributeId
Identified to be used to access an attribute.
Definition: AttributeFwd.h:73
nullptr_t, size_t, ptrdiff_t basic_ostream bad_weak_ptr extent, remove_extent, is_array,...
Definition: attribute_string_utils.h:21
std::tuple< ConstRowMatrixView< Scalar >, ConstRowMatrixView< Index > > get_uv_attribute(const SurfaceMesh< Scalar, Index > &mesh, std::string_view uv_attribute_name="")
Get the constant UV attribute buffers of a mesh.
Definition: get_uv_attribute.cpp:50
std::tuple< RowMatrixView< Scalar >, RowMatrixView< Index > > ref_uv_attribute(SurfaceMesh< Scalar, Index > &mesh, std::string_view uv_attribute_name="")
Get the modifiable UV attribute buffers of a mesh.
Definition: get_uv_attribute.cpp:74
AttributeId get_uv_id(const SurfaceMesh< Scalar, Index > &mesh, std::string_view uv_attribute_name="")
Get the ID of the UV attribute of a mesh.
Definition: get_uv_attribute.cpp:23