Lagrange
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
get_uv_attribute.h
1#pragma once
2/*
3 * Copyright 2025 Adobe. All rights reserved.
4 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. You may obtain a copy
6 * of the License at http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Unless required by applicable law or agreed to in writing, software distributed under
9 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
10 * OF ANY KIND, either express or implied. See the License for the specific language
11 * governing permissions and limitations under the License.
12 */
13
14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/views.h>
16
17#include <string_view>
18#include <tuple>
19
20namespace lagrange::internal {
21
31template <typename Scalar, typename Index>
34 std::string_view uv_attribute_name = "");
35
44template <typename Scalar, typename Index>
45std::tuple<ConstRowMatrixView<Scalar>, ConstRowMatrixView<Index>> get_uv_attribute(
47 std::string_view uv_attribute_name = "");
48
57template <typename Scalar, typename Index>
58std::tuple<RowMatrixView<Scalar>, RowMatrixView<Index>> ref_uv_attribute(
60 std::string_view uv_attribute_name = "");
61
62} // 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