|
Lagrange
|
Various attribute processing utilities. More...
Attribute remapping | |
Mapping attributes between different element types.
| |
| template<typename Scalar, typename Index> | |
| 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. | |
| template<typename Scalar, typename Index> | |
| AttributeId | map_attribute (SurfaceMesh< Scalar, Index > &mesh, std::string_view old_name, std::string_view new_name, AttributeElement new_element) |
| Map attribute values to a new attribute with a different element type. | |
| template<typename Scalar, typename Index> | |
| AttributeId | map_attribute_in_place (SurfaceMesh< Scalar, Index > &mesh, AttributeId id, AttributeElement new_element) |
| Map attribute values to a different element type. | |
| template<typename Scalar, typename Index> | |
| AttributeId | map_attribute_in_place (SurfaceMesh< Scalar, Index > &mesh, std::string_view name, AttributeElement new_element) |
| Map attribute values to a different element type. | |
Index buffer unification | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | unify_index_buffer (const SurfaceMesh< Scalar, Index > &mesh, const std::vector< AttributeId > &attribute_ids={}) |
Unify index buffers of the input mesh for all attributes specified in attribute_ids. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | unify_named_index_buffer (const SurfaceMesh< Scalar, Index > &mesh, const std::vector< std::string_view > &attribute_names) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Various attribute processing utilities.
| AttributeId map_attribute | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| AttributeId | id, | ||
| std::string_view | new_name, | ||
| AttributeElement | new_element ) |
#include <lagrange/map_attribute.h>
Map attribute values to a new attribute with a different element type.
If the input attribute is a value attribute, its number of rows must match the number of target mesh element (or number of corners if the target is an indexed attribute).
| [in,out] | mesh | Input mesh. Modified to add a new attribute. |
| [in] | id | Id of the input attribute to map. |
| [in] | new_name | Name of the new mesh attribute to create. |
| [in] | new_element | New attribute element type. |
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
| AttributeId map_attribute | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| std::string_view | old_name, | ||
| std::string_view | new_name, | ||
| AttributeElement | new_element ) |
#include <lagrange/map_attribute.h>
Map attribute values to a new attribute with a different element type.
If the input attribute is a value attribute, its number of rows must match the number of target mesh element (or number of corners if the target is an indexed attribute).
| [in,out] | mesh | Input mesh. Modified to add a new attribute. |
| [in] | old_name | Name of the input attribute to map. |
| [in] | new_name | Name of the new mesh attribute to create. |
| [in] | new_element | New attribute element type. |
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
| AttributeId map_attribute_in_place | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| AttributeId | id, | ||
| AttributeElement | new_element ) |
#include <lagrange/map_attribute.h>
Map attribute values to a different element type.
A new attribute with the new element type is created with the same name as the old one, and the old one is removed. If the input attribute is a value attribute, its number of rows must match the number of target mesh element (or number of corners if the target is an indexed attribute).
| [in,out] | mesh | Input mesh. Modified to add a new attribute. |
| [in] | id | Id of the input attribute to map. |
| [in] | new_element | New attribute element type. |
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
| AttributeId map_attribute_in_place | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| std::string_view | name, | ||
| AttributeElement | new_element ) |
#include <lagrange/map_attribute.h>
Map attribute values to a different element type.
A new attribute with the new element type is created with the same name as the old one, and the old one is removed. If the input attribute is a value attribute, its number of rows must match the number of target mesh element (or number of corners if the target is an indexed attribute).
| [in,out] | mesh | Input mesh. Modified to add a new attribute. |
| [in] | name | Name of the attribute to map. |
| [in] | new_element | New attribute element type. |
| Scalar | Mesh scalar type. |
| Index | Mesh index type. |
| SurfaceMesh< Scalar, Index > unify_index_buffer | ( | const SurfaceMesh< Scalar, Index > & | mesh, |
| const std::vector< AttributeId > & | attribute_ids = {} ) |
#include <lagrange/unify_index_buffer.h>
Unify index buffers of the input mesh for all attributes specified in attribute_ids.
attribute_id will become vertex attributes in the output mesh under the same names.| [in] | mesh | The input polygonal mesh. |
| [in] | attribute_ids | The input indexed attribute ids to be unified. If empty, all indexed attributes are unified. |
attribute_ids.| SurfaceMesh< Scalar, Index > unify_named_index_buffer | ( | const SurfaceMesh< Scalar, Index > & | mesh, |
| const std::vector< std::string_view > & | attribute_names ) |
#include <lagrange/unify_index_buffer.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| [in] | mesh | The input polygonal mesh. |
| [in] | attribute_names | The input indexed attribute names to be unified. If empty, all indexed attributes are unified. |
attribute_names.