14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/xatlas/Options.h>
21#include <xatlas/xatlas.h>
23namespace lagrange::xatlas::internal {
39 std::vector<float>
uvs;
51 ::xatlas::MeshDecl
as_decl() const noexcept;
62template <typename
Scalar, typename Index>
74 std::vector<float>
uvs;
90 ::xatlas::UvMeshDecl
as_decl() const noexcept;
101template <typename
Scalar, typename Index>
104 std::string_view uv_attribute_name,
105 std::string_view chart_attribute_name);
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
@ Scalar
Mesh attribute must have exactly 1 channel.
Definition AttributeFwd.h:56
Options controlling a full unwrap (segment + parameterize + pack).
Definition Options.h:128
Owning storage for an xatlas::MeshDecl derived from a Lagrange SurfaceMesh.
Definition mesh_to_xatlas.h:31
uint32_t vertex_count
Number of vertices (after optional unify).
Definition mesh_to_xatlas.h:45
uint32_t face_count
Number of facets.
Definition mesh_to_xatlas.h:48
std::vector< float > uvs
Optional float UV hints tightly packed (2 * vertex_count). Empty if no hints supplied.
Definition mesh_to_xatlas.h:39
std::vector< float > normals
Optional float normals tightly packed (3 * vertex_count). Empty if no normals supplied.
Definition mesh_to_xatlas.h:36
::xatlas::MeshDecl as_decl() const noexcept
Build an xatlas::MeshDecl referencing this adapter's buffers.
Definition mesh_to_xatlas.cpp:149
std::vector< uint32_t > indices
uint32 indices tightly packed (3 * facet_count for triangle-only meshes).
Definition mesh_to_xatlas.h:42
std::vector< float > positions
Float positions tightly packed (3 * vertex_count). Always copied/cast from input.
Definition mesh_to_xatlas.h:33
Owning storage for an xatlas::UvMeshDecl derived from a Lagrange SurfaceMesh whose UV attribute is to...
Definition mesh_to_xatlas.h:72
uint32_t vertex_count
Number of UV "vertices" (= number of unique indexed UV values).
Definition mesh_to_xatlas.h:84
uint32_t face_count
Number of triangles.
Definition mesh_to_xatlas.h:87
std::vector< uint32_t > face_materials
Optional per-face chart ids (size == face_count) forwarded to xatlas as faceMaterialData to pin input...
Definition mesh_to_xatlas.h:81
std::vector< float > uvs
Float UV values tightly packed (2 * vertex_count).
Definition mesh_to_xatlas.h:74
std::vector< uint32_t > indices
uint32 indices tightly packed (3 * facet_count).
Definition mesh_to_xatlas.h:77