Lagrange
map_attribute.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
16#include <string_view>
17
18namespace lagrange {
19
27
39
55template <typename Scalar, typename Index>
57 SurfaceMesh<Scalar, Index>& mesh,
58 AttributeId id,
59 std::string_view new_name,
60 AttributeElement new_element);
61
77template <typename Scalar, typename Index>
79 SurfaceMesh<Scalar, Index>& mesh,
80 std::string_view old_name,
81 std::string_view new_name,
82 AttributeElement new_element);
83
102template <typename Scalar, typename Index>
104 SurfaceMesh<Scalar, Index>& mesh,
105 AttributeId id,
106 AttributeElement new_element);
107
126template <typename Scalar, typename Index>
128 SurfaceMesh<Scalar, Index>& mesh,
129 std::string_view name,
130 AttributeElement new_element);
131
134
135} // namespace lagrange
AttributeId map_attribute_in_place(SurfaceMesh< Scalar, Index > &mesh, AttributeId id, AttributeElement new_element)
Map attribute values to a different element type.
Definition: map_attribute.cpp:268
AttributeId map_attribute(SurfaceMesh< Scalar, Index > &mesh, AttributeId id, std::string_view new_name, AttributeElement new_element)
Map attribute values to a new attribute with a different element type.
Definition: map_attribute.cpp:241
uint32_t AttributeId
Identified to be used to access an attribute.
Definition: AttributeFwd.h:73
AttributeElement
Type of element to which the attribute is attached.
Definition: AttributeFwd.h:26
Main namespace for Lagrange.
Definition: AABBIGL.h:30