40#ifndef GEOGRAM_MESH_MESH_REORDER
41#define GEOGRAM_MESH_MESH_REORDER
132 index_t total_nb_vertices,
const double* vertices,
159 index_t nb_vertices,
const double* vertices,
164 double ratio = 0.125,
184 index_t nb_vertices,
const double* vertices,
210 index_t nb_vertices,
const double* vertices,
219 nb_vertices, vertices,
225 vec3(period, period, period)
Vector with aligned memory allocation.
Common include file, providing basic definitions. Should be included before anything else by all head...
Geometric functions in 2d and 3d.
Types and functions for memory manipulation.
The class that represents a mesh.
Global Vorpaline namespace.
void mesh_reorder(Mesh &M, MeshOrder order=MESH_ORDER_HILBERT)
Reorders all the elements of a mesh.
vecng< 3, Numeric::float64 > vec3
Represents points and vectors in 3d.
void compute_mesh_elements_spatial_order(const Mesh &M, MeshElementsFlags elements, vector< index_t > &permutation, MeshOrder order=MESH_ORDER_HILBERT)
Computes the spatial order of mesh elements in 3d.
geo_index_t index_t
The type for storing and manipulating indices.
MeshOrder
Strategy for spatial sorting.
void compute_Hilbert_order(index_t total_nb_vertices, const double *vertices, vector< index_t > &sorted_indices, index_t first, index_t last, index_t dimension, index_t stride=3)
Computes the Hilbert order for a set of 3D points.
void compute_BRIO_order(index_t nb_vertices, const double *vertices, vector< index_t > &sorted_indices, index_t dimension, index_t stride=3, index_t threshold=64, double ratio=0.125, vector< index_t > *levels=nullptr)
Computes the BRIO order for a set of 3D points.
void Hilbert_sort_periodic(index_t nb_vertices, const double *vertices, vector< index_t > &sorted_indices, index_t dimension, index_t stride, vector< index_t >::iterator first, vector< index_t >::iterator last, const vec3 &period)
Spatially sort a set of vertices in periodic space.
Types and functions for numbers manipulation.