MEPP2 Project
Classes | Typedefs | Enumerations | Functions
FEVV::Filters Namespace Reference

Classes

class  Batch_collapser
 Batch_collapser: Takes an halfedge graph and collapses its edges. A Batch_collapser object can simplify as many times a mesh as possible. No need to create an object for each batch. Input: Original mesh. Output: a simplified mesh. More...
 
class  Batch_decompressor
 Batch_decompressor: Given a draco buffer, will decompress a non-textured (or not) mesh. More...
 
class  Binary_batch_decoder
 
class  Binary_batch_encoder
 Encode binary data with draco. Also contains static methods to generate csv files. More...
 
class  Butterfly
 
class  Coarse_mesh_decoder
 
class  Collapse_info
 Class used to store information on a single edge collapse operation. More...
 
class  Compare_weights2
 
struct  CopyGraphParameters
 
struct  CopyGraphParameters< FEVV::CGALPointSet, FEVV::CGALPointSet >
 Specialization of CopyGraphParameters for copy from CGAL Point Set to CGAL Point Set. More...
 
struct  CopyGraphParameters< FEVV::CGALPointSet, PointCloudT >
 Specialization of CopyGraphParameters for CGAL Point Set copy from. More...
 
struct  CopyGraphParameters< FEVV::PCLPointCloud, FEVV::PCLPointCloud >
 Specialization of CopyGraphParameters for copy from PCL Point Cloud to PCL Point Cloud. More...
 
struct  CopyGraphParameters< FEVV::PCLPointCloud, PointCloudT >
 Specialization of CopyGraphParameters for PCL Point Cloud copy from. More...
 
struct  CopyGraphParameters< PointCloudT, FEVV::CGALPointSet >
 Specialization of CopyGraphParameters for CGAL Point Set copy to. More...
 
struct  CopyGraphParameters< PointCloudT, FEVV::PCLPointCloud >
 Specialization of CopyGraphParameters for PCL Point Cloud copy to. More...
 
struct  CopyPCParameters
 
class  Delta_predictor
 
class  Edge_length_metric
 Concrete class to compute the collapse cost of each edge in a mesh as the edge length (L2).
More...
 
class  Error_metric
 Abstract class to compute the collapse cost of each edge in a mesh. It also manages a priority queue of (edge, cost, collapse position). More...
 
class  Geometric_metrics
 Geometric_metrics is a class dedicated to the geometric distance computation between an original full resolution mesh and a simplified version (a LoD). Two distortions are currently available, the maximum error (Hausdorff distance) and an approximation of the RMSE distance. Note: this code only works with CGAL mesh data structures for the time being. More...
 
class  Halfedge
 Concrete class to represent the target position type of the resulting vertex of an edge collapse. More...
 
class  Kept_position
 Abstract class to represent the position type of the resulting vertex of an edge collapse. More...
 
class  Memory_comparator
 Functor object to sort sequential container of Collapse_info objects. It is based on the Spanning_tree_vertex_edge_comparator functor.
More...
 
struct  MeshFromVectorReprParameters
 
class  Midpoint
 Concrete class to represent the midpoint position type of the resulting vertex of an edge collapse. More...
 
class  Parameters
 Parameters contains the compression parameters except the stopping criteria. More...
 
class  Predictor
 Abstract class used to predict position. More...
 
class  Preprocessing
 Preprocessing class is dedicated to provide a list of preprocessings that are needed to guarantee that the following progressive compression will work properly with a "decompressible" binary file.
More...
 
class  QEM_3D
 Concrete class to compute the collapse cost of each edge in a mesh as the memoryless variant of QEM error (Quadric Error Metric).
More...
 
class  Raw_positions
 
class  Refinement_info
 
class  Uniform_dequantization
 Uniform_dequantization is a class dedicated to the XYZ uniform dequantization of vertex coordinates stored in the mesh point map. More...
 
class  Uniform_quantization
 Uniform_quantization is a class dedicated to the XYZ uniform quantization of vertex coordinates stored in the mesh point map. More...
 
struct  v_Curv
 
struct  v_Curv_cmdm
 
class  Vertex_span_comparator
 Functor object to sort sequential container of vertex_descriptor objects. It is based on the Spanning_tree_vertex_edge_comparator functor.
More...
 
class  Volume_preserving
 Concrete class to compute the collapse cost of each edge in a mesh as the local absolute volume error.
More...
 

Typedefs

typedef std::vector< float > ColorMeshLUT
 
template<typename BoostGraphS , typename BoostGraphT >
using VertexToVertexMap = std::map< typename boost::graph_traits< BoostGraphS >::vertex_descriptor, typename boost::graph_traits< BoostGraphT >::vertex_descriptor >
 
template<typename FaceGraphS , typename FaceGraphT >
using FaceToFaceMap = std::map< typename boost::graph_traits< FaceGraphS >::face_descriptor, typename boost::graph_traits< FaceGraphT >::face_descriptor >
 
template<typename BoostGraph >
using VertDescVect = std::vector< typename boost::graph_traits< BoostGraph >::vertex_descriptor >
 
template<typename FaceGraph >
using FaceDescVect = std::vector< typename boost::graph_traits< FaceGraph >::face_descriptor >
 
template<typename PointCloudS , typename PointCloudT >
using PCVertexToVertexMap = std::map< typename boost::graph_traits< PointCloudS >::vertex_descriptor, typename boost::graph_traits< PointCloudT >::vertex_descriptor >
 

Enumerations

enum  BATCH_CONDITION { BATCH_CONDITION::ALL_EDGES = 0, BATCH_CONDITION::REACH_THRESHOLD }
 
enum  TOPOLOGY_CASE {
  TOPOLOGY_CASE::CASE11 = 0, TOPOLOGY_CASE::CASE12, TOPOLOGY_CASE::CASE13, TOPOLOGY_CASE::CASE211,
  TOPOLOGY_CASE::CASE212, TOPOLOGY_CASE::CASE221, TOPOLOGY_CASE::CASE222, TOPOLOGY_CASE::SIMPLE
}
 
enum  PREDICTION_TYPE { PREDICTION_TYPE::POSITION = 0, PREDICTION_TYPE::DELTA, PREDICTION_TYPE::BUTTERFLY }
 
enum  VKEPT_POSITION { VKEPT_POSITION::MIDPOINT = 0, VKEPT_POSITION::HALFEDGE, VKEPT_POSITION::FULLEDGE }
 
enum  METRIC_TYPE { METRIC_TYPE::NO_METRIC = -1, METRIC_TYPE::QEM_3D, METRIC_TYPE::EDGE_LENGTH, METRIC_TYPE::VOLUME_PRESERVING }
 

Functions

template<typename FaceGraph >
bool clean_topology (FaceGraph &g, bool remove_isolated_vertices=true, bool remove_isolated_edges=true, bool remove_isolated_faces=false, bool remove_similar_edges=true, bool remove_similar_faces=true)
 Function use for cleaning the topology of mesh g. This can be seen as a preprocessing step for some geometry processing algorithms. More...
 
template<typename FaceGraph , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
std::vector< typename boost::graph_traits< FaceGraph >::edge_descriptor > edge_selector_for_collapse (const FaceGraph &g, bool is_g_2_manifold, bool forbid_non_satisfying_link_condition, bool forbid_non_manifold_edge, bool forbid_edge_collapse_creating_non_manifold_split, bool forbid_border_edge, bool forbid_inner_edge, bool forbid_non_triangular_incident_face_to_edge, bool forbid_edges_that_are_adjacent_to_collapsed_edges, bool forbid_edges_that_are_one_ring_edges_of_collapsed_edge_vertices, bool forbid_edges_that_are_incident_to_opposite_vertices_of_collapsed_edge_vertices, bool forbid_edges_that_are_incident_to_one_ring_of_collapsed_edge_vertices, const std::set< typename boost::graph_traits< FaceGraph >::edge_descriptor > &external_forbidden_edges_to_collapse, const GeometryTraits &gt)
 Function used for cleaning the topology of mesh g. This can be seen as a preprocessing step for some geometry processing algorithms. More...
 
template<typename FaceGraph , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
std::vector< typename boost::graph_traits< FaceGraph >::edge_descriptor > edge_selector_for_collapse (const FaceGraph &g, bool is_g_2_manifold, bool forbid_non_satisfying_link_condition, bool forbid_non_manifold_edge, bool forbid_edge_collapse_creating_non_manifold_split, bool forbid_border_edge, bool forbid_inner_edge, bool forbid_non_triangular_incident_face_to_edge, bool forbid_edges_that_are_adjacent_to_collapsed_edges, bool forbid_edges_that_are_one_ring_edges_of_collapsed_edge_vertices, bool forbid_edges_that_are_incident_to_opposite_vertices_of_collapsed_edge_vertices, bool forbid_edges_that_are_incident_to_one_ring_of_collapsed_edge_vertices, const GeometryTraits &gt)
 Function used for cleaning the topology of mesh g. This can be seen as a preprocessing step for some geometry processing algorithms. More...
 
template<typename FaceGraph >
bool is_triangle_mesh (const FaceGraph &g)
 Function determining if mesh g is a pure triangular mesh. More...
 
template<typename MutableFaceIncidentGraph >
static void resolve_similar_edges (MutableFaceIncidentGraph &g)
 Remove/resolve similar edges for the given mesh g. More...
 
template<typename MutableFaceIncidentGraph >
static void resolve_similar_faces (MutableFaceIncidentGraph &g, bool take_into_account_face_rientation=false)
 Remove/resolve similar faces for the given mesh g. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void boolean_union (HalfedgeGraph &gA, HalfedgeGraph &gB, HalfedgeGraph &g_out, const GeometryTraits &)
 Computes the union of two polyhedra. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void boolean_union (HalfedgeGraph &gA, HalfedgeGraph &gB, HalfedgeGraph &g_out)
 Computes the union of two polyhedra. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void boolean_inter (HalfedgeGraph &gA, HalfedgeGraph &gB, HalfedgeGraph &g_out, const GeometryTraits &)
 Computes the intersection of two polyhedra. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void boolean_inter (HalfedgeGraph &gA, HalfedgeGraph &gB, HalfedgeGraph &g_out)
 Computes the intersection of two polyhedra. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void boolean_minus (HalfedgeGraph &gA, HalfedgeGraph &gB, HalfedgeGraph &g_out, const GeometryTraits &)
 Computes the subtraction of two polyhedra. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void boolean_minus (HalfedgeGraph &gA, HalfedgeGraph &gB, HalfedgeGraph &g_out)
 Computes the subtraction of two polyhedra. More...
 
void read_mesh (const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps, bool=false)
 Load mesh from file. More...
 
void write_mesh (const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps)
 Write mesh to file. More...
 
template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const FEVV::CGALPointSet &pc_s, const FEVV::PMapsContainer &pmaps_s, PointCloudT &pc_t, FEVV::PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Overloading of copy_graph() for CGAL Point Set copy from. More...
 
template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const PointCloudT &pc_s, const FEVV::PMapsContainer &pmaps_s, FEVV::CGALPointSet &pc_t, FEVV::PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Overloading of copy_graph() for CGAL Point Set copy to. More...
 
template<typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const FEVV::CGALPointSet &pc_s, const FEVV::PMapsContainer &pmaps_s, FEVV::CGALPointSet &pc_t, FEVV::PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Overloading of copy_graph() for copy from CGAL Point Set to CGAL Point Set. More...
 
template<typename HalfedgeGraph , typename PointMap , typename EdgeColorMap , typename edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor>
void color_edge (HalfedgeGraph &, PointMap &, EdgeColorMap &e_cm, edge_descriptor edge_to_color, typename boost::property_traits< EdgeColorMap >::value_type color)
 Colors an edge by putting the specified color into the edge color map at the "edge" position. Used for debug purpose. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor>
void color_vertex (HalfedgeGraph &, PointMap &, VertexColorMap &v_cm, vertex_descriptor vertex_to_color, typename boost::property_traits< VertexColorMap >::value_type color)
 Colors a vertex by putting the specified color into the vertex color map at the "vertex" position. Used for debug purpose. More...
 
template<typename HalfedgeGraph , typename PointMap , typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor, typename edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, typename Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >>
void connectivity_encoding (const HalfedgeGraph &g, const PointMap &, Collapse_info< HalfedgeGraph, PointMap > &mem, edge_descriptor starting_edge, std::list< bool > &edge_bitmask)
 Encode vertex to split' one-ring edges to expand. For a vertex to split (represented by a Collapse_info object), will encode
the edges to expand in a binary stream, 1 being an edge that should be expanded and 0 being an edge that should not. Takes as arguments a graph g, a pointmap, a Collapse_info object (again, representing a vertex and many necessary refinement info), the first edge to process (see the encode_connectivity_bitmask function), and the edge/connectivity bitmask (which will receive the connectivity bitstream). More...
 
template<typename HalfedgeGraph , typename PointMap , typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor, typename edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, typename Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >>
void encode_connectivity_bitmask (const HalfedgeGraph &g, const PointMap &pm, std::list< Collapse_info< HalfedgeGraph, PointMap > > &list_memory, std::list< bool > &edge_bitmask, const FEVV::Comparator::Spanning_tree_vertex_edge_comparator< HalfedgeGraph, PointMap, Geometry > &spanningtree)
 Encode vertex to split' one-ring edges to expand, for all collapsed edges in the order of the sorted list list_memory. More...
 
template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void forbid_vertex (HalfedgeGraph &g, vertex_descriptor v, std::set< halfedge_descriptor > &forbidden_edges)
 
template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void find_vertices_to_forbid (HalfedgeGraph &g, vertex_descriptor v, std::set< vertex_descriptor > &forbidden_vertices)
 
template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void forbid_edges (HalfedgeGraph &g, vertex_descriptor v, std::set< halfedge_descriptor > &forbidden_edges)
 
template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void compute_simple_stencil (HalfedgeGraph &g, vertex_descriptor v, std::set< halfedge_descriptor > &forbidden_edges, std::vector< halfedge_descriptor > &edges_to_color)
 
template<typename HalfedgeGraph , typename PointMap >
void preprocess_mesh (HalfedgeGraph &g, PointMap &pm, FEVV::Filters::Uniform_quantization< HalfedgeGraph, PointMap > &pq, bool allow_duplicates=false)
 Isolated vertices and isolated edges are removed, then vertex positions are quantized, and eventually, vertex duplicates are moved until there is no more vertex position duplicate. This function implements line 1 of Algorithm 1. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename EdgeColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void progressive_compression_filter (HalfedgeGraph &g, PointMap &pm, FEVV::Filters::Uniform_quantization< HalfedgeGraph, PointMap > &pq, VertexColorMap &v_cm, EdgeColorMap &e_cm, const GeometryTraits &gt, FEVV::Filters::Error_metric< HalfedgeGraph, PointMap > *EM, const FEVV::Filters::Kept_position< HalfedgeGraph, PointMap > *KP, FEVV::Filters::Predictor< HalfedgeGraph, PointMap > *predict, int nb_q_bits, int nb_max_batches, int nb_min_vertices, FEVV::Filters::BATCH_CONDITION batch_condition, draco::EncoderBuffer &buffer, const std::string &measure_path, bool preprocess=true, bool dequantiz=false, bool save_preprocess=false, const std::string &output_file_path_save_preprocess="", bool allow_duplicates=false)
 Takes a mesh g, applies batches of simplification until either the number of max batches or the minimum number of vertices is reached. After that, it encodes the coarse mesh and the refinement data into a buffer. This function implements Algorithm 1 (Progressive encoder). More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename EdgeColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void progressive_compression_filter (HalfedgeGraph &g, PointMap &pm, VertexColorMap &v_cm, EdgeColorMap &e_cm, const GeometryTraits &gt, const FEVV::Filters::Parameters &params, int nb_max_batches, int nb_min_vertices, FEVV::Filters::BATCH_CONDITION batch_condition, const std::string &output_path, std::string &binary_path, bool preprocess=true, bool dequantiz=false, bool save_preprocess=false, const std::string &output_file_path_save_preprocess="")
 Takes a mesh g, applies batches of simplification until either the number of max batches or the minimum number of vertices is reached. After that, it encodes the coarse mesh and the refinement data to a binary file. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename EdgeColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void progressive_compression_filter (HalfedgeGraph &g, PointMap &pm, VertexColorMap &v_cm, EdgeColorMap &e_cm, const FEVV::Filters::Parameters &params, const std::string &output_path, std::string &binary_path, int nb_max_batches, int nb_min_vertices, FEVV::Filters::BATCH_CONDITION batch_condition, bool preprocess=true, bool dequantiz=false, bool save_preprocess=false, const std::string &output_file_path_save_preprocess="")
 Takes a mesh g, applies batches of simplification until either the number of max batches or the minimum number of vertices is reached. After that, it encodes the coarse mesh and the refinement data to a binary file. The geometry trait object is set automatically (syntactic sugar). More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits >
void progressive_decompression_filter (HalfedgeGraph &g, PointMap &pm, VertexColorMap &v_cm, const GeometryTraits &, draco::DecoderBuffer &buffer, bool dequantize=true, unsigned int nb_max_batches=10000)
 Takes a buffer as an input, will decode the compression settings, the coarse mesh and refine the mesh until the end of buffer is reached. This function implements the Algorithm 2 (Progressive decoder). More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits >
void progressive_decompression_filter (HalfedgeGraph &g, PointMap &pm, VertexColorMap &v_cm, const GeometryTraits &gt, const std::string &input_file_path, bool dequantize=true, unsigned int nb_max_batches=10000)
 Takes a binary file as an input, will decode the compression
settings, the coarse mesh and refine the mesh until the end of file is reached. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void progressive_decompression_filter (HalfedgeGraph &g, PointMap &pm, VertexColorMap &v_cm, const std::string &input_file_path, bool dequantize=true, unsigned int nb_max_batches=10000)
 Takes a binary file as an input, will decode the compression settings, the coarse mesh and refine the mesh until the end of file is reached. The geometry trait object is set automatically (syntactic sugar). More...
 
template<typename Point3d , typename Vector >
bool sphere_clip_vector_cmdm (Point3d &o, double r, const Point3d &p, Vector &v)
 
template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename CMDMNearestMap >
void compute_geometry_statistics (const HalfedgeGraph &, const PointMap &pm_degr, const CMDMNearestMap &nearest_pmap, const VertexIterator p_vertex, std::vector< double > &tab_distance1, std::vector< double > &tab_distance2, std::vector< CGALPoint > &tab_point1, std::vector< CGALPoint > &tab_point2, double *tab_f1, double *tab_f2, double *tab_f3, double radius)
 Calculates the local geometry-based features per vertex. More...
 
template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename CMDMNearestMap >
void compute_color_statistics (const HalfedgeGraph &, const PointMap &pm_degr, const CMDMNearestMap &nearest_pmap, const VertexIterator p_vertex, std::vector< std::array< double, 3 > > &tab_color1, std::vector< std::array< double, 3 > > &tab_color2, std::vector< CGALPoint > &tab_point1, std::vector< CGALPoint > &tab_point2, double *tab_f4, double *tab_f5, double *tab_f6, double *tab_f7, double *tab_f8, double radius)
 Calculates the local color-based features per vertex. More...
 
template<typename HalfedgeGraph , typename VertexColorMap = typename FEVV:: PMap_traits< FEVV::vertex_color_t, MeshSurface >::pmap_type>
VertexColorMap Get_VertexColorMap (const HalfedgeGraph &m_poly, FEVV::PMapsContainer &pmaps, std::vector< double > &init_grid_L, std::vector< double > &grid_L, std::vector< std::vector< std::pair< double, double > > > &init_grid_AB)
 Retrieve the color (RGB values) of each vertex of the mesh and transform it into the working color space LAB2000HL. More...
 
template<typename CMDMMap , typename HalfedgeGraph , typename CMDMNearestMap , typename TagMap , typename PointMap , typename FaceIterator = typename boost::graph_traits< HalfedgeGraph >::face_iterator>
void matching_multires_init_cmdm (const HalfedgeGraph &m_poly_degrad, CMDMMap &cmdm_degrad, CMDMNearestMap &cmdmm_degrad, TagMap &tag_map, const PointMap &pm_degrad, const HalfedgeGraph &m_poly_original, CGAL::SM_Face_index *tab_matched_facet)
 Initialize the matching process. More...
 
template<typename PointMap , typename HalfedgeGraph , typename FaceNormalMap , typename VertexCMDMMap >
double process_CMDM_multires (const HalfedgeGraph &m_poly_degrad, const PointMap &pm_degrad, const FaceNormalMap &fnm_degrad, FEVV::PMapsContainer &pmaps_degrad, const HalfedgeGraph &m_poly_original, const PointMap &pm_original, const FaceNormalMap &fnm_original, FEVV::PMapsContainer &pmaps_original, const int nb_level, VertexCMDMMap &cmdm_pmap, const double maxdim, double &CMDM_value)
 
template<typename HalfedgeGraph , typename CurvatureVertexMap , typename CMDMCurvatureMatchMap , typename VertexColorMap >
void matching_multires_update (const HalfedgeGraph &m_poly_degrad, const HalfedgeGraph &m_poly_orig, CGALPoint *tab_pm_orig, CGALPoint *tab_cmdmm_degrad, const CurvatureVertexMap curv_orig, const VertexColorMap vcm_orig, CMDMCurvatureMatchMap curvmatch_pmap, VertexColorMap colmatch_pmap, CGAL::SM_Face_index *tab_matched_facet)
 Updates the matching process. More...
 
template<typename VertexIterator , typename HalfedgeGraph , typename TagMap , typename CurvatureVertexMap , typename CMDMCurvatureMatchMap , typename VertexColorMap >
void process_cmdm_per_vertex (const HalfedgeGraph &m_degr, CGALPoint *tab_pm_degr, const TagMap &tags_pmap, CGALPoint *tab_nearest_pmap, const CurvatureVertexMap &curv_pmap_degr, const VertexColorMap &col_pmap_degr, const CMDMCurvatureMatchMap &curvmatch_pmap, const VertexColorMap &colmatch_pmap, const VertexIterator &p_vertex, double radius, std::vector< CGALPoint > &tab_point1, std::vector< CGALPoint > &tab_point2, std::vector< double > &tab_distance1, std::vector< double > &tab_distance2, std::vector< std::array< double, 3 > > &tab_color1, std::vector< std::array< double, 3 > > &tab_color2)
 Computes the local neighborhoods. More...
 
template<typename HalfedgeGraph , typename CurvatureVertexMap >
void kmax_kmean_cmdm (const HalfedgeGraph &mesh, CurvatureVertexMap &curv_vmap, const double coef)
 Computes the mean curvature field (kmin+kmax)/2 and normalize it according to the size of the model. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename PointMap , typename FaceNormalMap , typename VertexCMDMMap >
double process_CMDM_multires (const HalfedgeGraph &m_poly_degrad, const PointMap &pm_degrad, const FaceNormalMap &fnm_degrad, FEVV::PMapsContainer &pmaps_degrad, const HalfedgeGraph &m_poly_original, const PointMap &pm_original, const FaceNormalMap &fnm_original, FEVV::PMapsContainer &pmaps_original, const int nb_level, VertexCMDMMap &cmdm_pmap, double &CMDM_value)
 Computes the multiscale CMDM metric. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double fabs_cmdm (const v_Curv_cmdm< HalfedgeGraph > &input)
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double triangle_area_cmdm (const HalfedgeGraph &g, const PointMap &pm, typename boost::graph_traits< HalfedgeGraph >::face_descriptor fd, const GeometryTraits &gt)
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void principal_curvature_per_vert_cmdm (const HalfedgeGraph &g, const PointMap &pm, const FaceNormalMap &f_nm, VertexDescriptor vd, double pp_matrix_sum[3][3], const GeometryTraits &gt)
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void geodes_principal_curvature_per_vert_cmdm (const HalfedgeGraph &g, const PointMap &pm, const FaceNormalMap &f_nm, VertexDescriptor vd, double pp_matrix_sum[3][3], double radius, const GeometryTraits &gt)
 
template<typename HalfedgeGraph , typename VertexCurvatureMap , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void calculate_curvature_cmdm (const HalfedgeGraph &g, VertexCurvatureMap &v_cm, const PointMap &pm, const FaceNormalMap &f_nm, bool is_geod, double radius, double &min_nrm_min_curvature, double &max_nrm_min_curvature, double &min_nrm_max_curvature, double &max_nrm_max_curvature, const GeometryTraits &gt)
 Calculate the curvature for a mesh. More...
 
template<typename HalfedgeGraph , typename VertexCurvatureMap , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void calculate_curvature_cmdm (const HalfedgeGraph &g, VertexCurvatureMap &v_cm, const PointMap &pm, const FaceNormalMap &f_nm, bool is_geod, double radius, double &min_nrm_min_curvature, double &max_nrm_min_curvature, double &min_nrm_max_curvature, double &max_nrm_max_curvature)
 Calculate the curvature for a mesh. More...
 
template<typename Point3d , typename Vector >
bool sphere_clip_vector_msdm2 (Point3d &o, double r, const Point3d &p, Vector &v)
 
template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename MSDM2NearestMap , typename MSDM2Map >
void compute_statistics (const HalfedgeGraph &, const PointMap &pm_degr, const MSDM2NearestMap &nearest_pmap, MSDM2Map &msdm2_map, const VertexIterator p_vertex, double param, std::vector< double > &tab_distance1, std::vector< double > &tab_distance2, std::vector< CGALPoint > &tab_point1, std::vector< CGALPoint > &tab_point2, double radius, double)
 Calculates the local curvature statistics per vertex. More...
 
template<typename MSDM2Map , typename HalfedgeGraph , typename MSDM2NearestMap , typename PointMap , typename TagMap , typename FaceIterator = typename boost::graph_traits< HalfedgeGraph >::face_iterator>
void matching_multires_init (const HalfedgeGraph &m_poly_degrad, MSDM2Map &msdm2m_degrad, MSDM2NearestMap &msdm2nm_degrad, TagMap &tag_map, const PointMap &pm_degrad, const HalfedgeGraph &m_poly_original, CGAL::SM_Face_index *tab_matched_facet)
 Initialize the matching process. More...
 
template<typename PointMap , typename HalfedgeGraph , typename FaceNormalMap , typename VertexMSDM2Map , typename GeometryTraits >
double process_msdm2_multires (const HalfedgeGraph &m_poly_degrad, const PointMap &pm_degrad, const FaceNormalMap &fnm_degrad, FEVV::PMapsContainer &pmaps_degrad, const GeometryTraits &gt_degrad, const HalfedgeGraph &m_poly_original, const PointMap &pm_original, const FaceNormalMap &fnm_original, FEVV::PMapsContainer &, const GeometryTraits &, const int nb_level, VertexMSDM2Map &msdm2_pmap, const double maxdim, double &msdm2_value)
 
template<typename PointMap , typename HalfedgeGraph , typename CurvatureVertexMap , typename MSMD2CurvatureMatchMap >
void matching_multires_update (const HalfedgeGraph &m_poly_degrad, const PointMap &pm_degr, const HalfedgeGraph &m_poly_orig, const PointMap &pm_orig, const CurvatureVertexMap curv_orig, MSMD2CurvatureMatchMap curvmatch_pmap, CGAL::SM_Face_index *tab_matched_facet)
 Updates the matching process. More...
 
template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename TagMap , typename CurvatureVertexMap , typename MSDM2NearestMap , typename MSMD2CurvatureMatchMap , typename GeometryTraits >
void process_msdm2_per_vertex (const HalfedgeGraph &m_degr, const PointMap &pm_degr, const TagMap &tags_pmap, const CurvatureVertexMap &curv_pmap, const MSDM2NearestMap &nearest_pmap, const MSMD2CurvatureMatchMap &curvmatch_pmap, const GeometryTraits &, const HalfedgeGraph &, const PointMap &, const VertexIterator &p_vertex, double radius, std::vector< double > &tab_distance1, std::vector< double > &tab_distance2, std::vector< CGALPoint > &tab_point1, std::vector< CGALPoint > &tab_point2)
 Computes the local neighborhoods. More...
 
template<typename HalfedgeGraph , typename CurvatureVertexMap >
void kmax_kmean (const HalfedgeGraph &mesh, CurvatureVertexMap &curv_vmap, const double coef)
 Computes the mean curvature field (kmin+kmax)/2 and normalize it according to the size of the model. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename PointMap , typename FaceNormalMap , typename VertexMSDM2Map >
double process_msdm2_multires (const HalfedgeGraph &m_poly_degrad, const PointMap &pm_degrad, const FaceNormalMap &fnm_degrad, FEVV::PMapsContainer &pmaps_degrad, const HalfedgeGraph &m_poly_original, const PointMap &pm_original, const FaceNormalMap &fnm_original, FEVV::PMapsContainer &pmaps_original, const int nb_level, VertexMSDM2Map &msdm2_pmap, double &msdm2_value)
 Computes the multiscale MSDM2 metric. More...
 
template<typename PropertyGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< PropertyGraph >>
void compute_mesh_bounding_box (const PropertyGraph &g, const PointMap &pm, typename boost::property_traits< PointMap >::value_type &min_aabb, typename boost::property_traits< PointMap >::value_type &max_aabb, const GeometryTraits &gt)
 Compute the mesh Axis-Aligned Bounding-Box (AABB). More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double get_max_bb_size (const HalfedgeGraph &g, PointMap &pm, GeometryTraits &gt)
 Gets the maximum size of the object bounding box. More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double get_max_bb_size (const HalfedgeGraph &g, PointMap &pm)
 Gets the maximum size of the object bounding box. Use the default geometry traits of the mesh. More...
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits >
void calculate_face_normals (const HalfedgeGraph &g, const PointMap &pm, FaceNormalMap fnm, const GeometryTraits &gt)
 Calculate "some" normal of all the faces of the considered mesh and populate the argument provided Face Normal Map with the resulting normals. More...
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void calculate_face_normals (const HalfedgeGraph &g, const PointMap &pm, FaceNormalMap fnm)
 Compute all faces normals. More...
 
ColorMeshLUT make_LUT (bool color_in_0_255=true, unsigned int colors_nbr=256, float h1=240, float h2=0)
 Create a RGB LUT based on an HSV range. Default range creates a blue-cyan-green-yellow-red gradient. More...
 
template<typename Descriptor , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void color_descriptor_from_map (const Descriptor &d, const PropertyMap &prop_map, ColorMap &color_pmap, const MapType min_metric, const MapType max_metric, const ColorMeshLUT &colors)
 Set the color for the descriptor using a numerical property map and the color array given. More...
 
template<typename HalfedgeGraph , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void color_faces_from_map (const HalfedgeGraph &g, const PropertyMap &prop_map, ColorMap &color_pmap, const MapType min_metric, const MapType max_metric, const ColorMeshLUT &colors=make_LUT())
 Fill the color map for the faces of a mesh using a numerical property map. More...
 
template<typename HalfedgeGraph , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void color_vertices_from_map (const HalfedgeGraph &g, const PropertyMap &prop_map, ColorMap &color_pmap, const MapType min_metric, const MapType max_metric, const ColorMeshLUT &colors=make_LUT())
 Fill the color map for the vertices of a mesh using a numerical property map. More...
 
template<typename HalfedgeGraph , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void color_halfedges_from_map (const HalfedgeGraph &g, const PropertyMap &prop_map, ColorMap &color_pmap, const MapType min_metric, const MapType max_metric, const ColorMeshLUT &colors=make_LUT())
 Fill the color map for the halfedges of a mesh using a numerical property map. More...
 
template<typename Descriptor , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void color_descriptor_from_bool (const Descriptor &d, const BooleanMap &prop_map, ColorMap &color_pmap, const Color &color1, const Color &color2)
 Set the color for the descriptor using a boolean property map and the colors given. More...
 
template<typename HalfedgeGraph , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void color_faces_from_bool_map (const HalfedgeGraph &g, const BooleanMap &prop_map, ColorMap &color_pmap, const Color &color1, const Color &color2)
 Fill the color map for the faces of a mesh using a boolean property map. More...
 
template<typename HalfedgeGraph , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void color_vertices_from_bool_map (const HalfedgeGraph &g, const BooleanMap &prop_map, ColorMap &color_pmap, const Color &color1, const Color &color2)
 Fill the color map for the vertices of a mesh using a boolean property map. More...
 
template<typename HalfedgeGraph , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void color_halfedge_from_bool_map (const HalfedgeGraph &g, const BooleanMap &prop_map, ColorMap &color_pmap, const Color &color1, const Color &color2)
 Fill the color map for the halfedges of a mesh using a boolean property map. More...
 
template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const FaceListGraphS &g_s, const PMapsContainer &pmaps_s, FaceListGraphT &g_t, PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Copy a source mesh into a target mesh. Copy standard properties too. More...
 
template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters = CopyGraphParameters< FaceListGraphS, FaceListGraphT >, typename GeometryTraitsS = FEVV::Geometry_traits< FaceListGraphS >, typename GeometryTraitsT = FEVV::Geometry_traits< FaceListGraphT >>
void copy_graph (const FaceListGraphS &g_s, const PMapsContainer &pmap_s, FaceListGraphT &g_t, PMapsContainer &pmap_t, const Parameters &params=CopyGraphParameters< FaceListGraphS, FaceListGraphT >())
 Copy a source mesh into a target mesh. Copy standard properties too. More...
 
template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const FaceListGraphS &g_s, FaceListGraphT &g_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Copy a source mesh into a target mesh. Do NOT Copy properties. More...
 
template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters = CopyGraphParameters< FaceListGraphS, FaceListGraphT >, typename GeometryTraitsS = FEVV::Geometry_traits< FaceListGraphS >, typename GeometryTraitsT = FEVV::Geometry_traits< FaceListGraphT >>
void copy_graph (const FaceListGraphS &g_s, FaceListGraphT &g_t, const Parameters &params=CopyGraphParameters< FaceListGraphS, FaceListGraphT >())
 Copy a source mesh into a target mesh. Do NOT copy properties. More...
 
double get_time_and_reset (std::chrono::time_point< std::chrono::steady_clock > &time_start)
 Measure time since starting time and reset starting time. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void read_mesh (const std::string &filename, HalfedgeGraph &g, PMapsContainer &pmaps, const GeometryTraits &gt, bool only_pts)
 Load mesh from file. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void read_mesh (const std::string &filename, HalfedgeGraph &g, PMapsContainer &pmaps, bool only_pts=false)
 Load mesh from file. More...
 
template<typename HalfedgeGraph , typename GeometryTraits >
void write_mesh (const std::string &filename, HalfedgeGraph &g, PMapsContainer &pmaps, const GeometryTraits &gt)
 Write mesh to file. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void write_mesh (const std::string &filename, HalfedgeGraph &g, PMapsContainer &pmaps)
 Write mesh to file. More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits >
void homogeneous_transform (const HalfedgeGraph &g, PointMap &pm, const Eigen::Matrix4d &mat, const GeometryTraits &gt)
 Calculate the homogeneous transformation of the vertices coordinates using the provided 4x4 homogeneous transformation matrix. More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void homogeneous_transform (const HalfedgeGraph &g, PointMap &pm, const Eigen::Matrix4d &mat)
 Calculate the homogeneous transformation of the vertices coordinates using the provided 4x4 homogeneous transformation matrix. More...
 
template<typename HalfedgeGraph , typename PointMap , typename HalfedgeUVMap , typename VertexTangentMap >
void calculate_halfedges_tangent (const HalfedgeGraph &g, const PointMap &pm, const HalfedgeUVMap &hum, VertexTangentMap &vtm)
 Calculate the mesh's tangents from its halfedges. More...
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename VertexNormalMap , typename GeometryTraits >
void calculate_vertex_normals (const HalfedgeGraph &g, const PointMap &pm, const FaceNormalMap &fnm, VertexNormalMap vnm, const GeometryTraits &gt)
 Compute the respectice vertex normal for all the vertices of the considered mesh and populate the argument provided Face Normal Map with the resulting normals. More...
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename VertexNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void calculate_vertex_normals (const HalfedgeGraph &g, const PointMap &pm, const FaceNormalMap &fnm, VertexNormalMap vnm)
 Compute the respectice vertex normal for all the vertices of the considered mesh and populate the argument provided Face Normal Map with the resulting normals. More...
 
template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void calculate_vertices_one_ring_angles_based_centroid (const FaceGraph &g, const PointMap &pm, CentroidMap angles_based_centroids_pm, const typename GeometryTraits::Scalar smoothing_factor, const GeometryTraits &gt)
 Compute angle-based centroids for all vertices and store them in bangles_based_centroids_pm. More...
 
template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void calculate_vertices_one_ring_angles_based_centroid (const FaceGraph &g, const PointMap &pm, CentroidMap angles_based_centroids_pm, const typename GeometryTraits::Scalar smoothing_factor=0.1)
 
template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void calculate_vertices_one_ring_barycenter (const FaceGraph &g, const PointMap &pm, CentroidMap barycenters_pm, const typename GeometryTraits::Scalar smoothing_factor, const GeometryTraits &gt)
 Compute barycenters for all vertices and store them in barycenters_pm. More...
 
template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void calculate_vertices_one_ring_barycenter (const FaceGraph &g, const PointMap &pm, CentroidMap barycenters_pm, const typename GeometryTraits::Scalar smoothing_factor=0.1)
 
template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void calculate_vertices_one_ring_geometric_laplacian (const FaceGraph &g, const PointMap &pm, CentroidMap geom_laplacians_pm, const typename GeometryTraits::Scalar smoothing_factor, const GeometryTraits &gt)
 Compute geometric laplacians for all vertices and store them in geom_laplacians_pm. More...
 
template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void calculate_vertices_one_ring_geometric_laplacian (const FaceGraph &g, const PointMap &pm, CentroidMap geom_laplacians_pm, const typename GeometryTraits::Scalar smoothing_factor=0.1)
 
template<typename HalfedgeGraph , typename PointMap , typename VertexUVMap , typename VertexTangentMap >
void calculate_vertices_tangent (const HalfedgeGraph &g, const PointMap &pm, const VertexUVMap &vum, VertexTangentMap &vtm)
 Calculate the mesh's tangents from its vertices. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string compression_valence (HalfedgeGraph &g, PointMap *pm, VertexColorMap *v_cm, const std::string &input_filename, const std::string &output_filename, bool with_compression, bool with_adaptative_quantization, int max_vertices, int quantiz_bits, const GeometryTraits &)
 Compress the input mesh using the Compression Valence algorithm. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string compression_valence (HalfedgeGraph &g, PointMap *pm, VertexColorMap *v_cm, const std::string &input_filename, const std::string &output_filename, bool with_compression=false, bool with_adaptative_quantization=false, int max_vertices=100, int quantiz_bits=10)
 Compress the input mesh using the Compression Valence algorithm. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string decompression_valence (HalfedgeGraph &g, PointMap *pm, VertexColorMap *v_cm, const std::string &input_filename, bool &has_color, bool do_write_info, std::vector< HalfedgeGraph * > *intermediate_meshes, std::vector< VertexColorMap * > *intermediate_vertex_color_maps, int stop_level, bool do_write_intermediate_meshes, const GeometryTraits &)
 Uncompress a mesh compressed with Compression Valence algorithm. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string decompression_valence (HalfedgeGraph &g, PointMap *pm, VertexColorMap *v_cm, const std::string &input_filename, bool &has_color, bool do_write_info=false, std::vector< HalfedgeGraph * > *intermediate_meshes=nullptr, std::vector< VertexColorMap * > *intermediate_vertex_color_maps=nullptr, int stop_level=-1, bool do_write_intermediate_meshes=false)
 Uncompress a mesh compressed with Compression Valence algorithm. More...
 
template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double fabs (const v_Curv< HalfedgeGraph > &input)
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double triangle_area (const HalfedgeGraph &g, const PointMap &pm, typename boost::graph_traits< HalfedgeGraph >::face_descriptor fd, const GeometryTraits &gt)
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void principal_curvature_per_vert (const HalfedgeGraph &g, const PointMap &pm, const FaceNormalMap &f_nm, VertexDescriptor vd, double pp_matrix_sum[3][3], const GeometryTraits &gt)
 
template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void geodes_principal_curvature_per_vert (const HalfedgeGraph &g, const PointMap &pm, const FaceNormalMap &f_nm, VertexDescriptor vd, double pp_matrix_sum[3][3], double radius, const GeometryTraits &gt)
 
template<typename HalfedgeGraph , typename VertexCurvatureMap , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void calculate_curvature (const HalfedgeGraph &g, VertexCurvatureMap &v_cm, const PointMap &pm, const FaceNormalMap &f_nm, bool is_geod, double radius, double &min_nrm_min_curvature, double &max_nrm_min_curvature, double &min_nrm_max_curvature, double &max_nrm_max_curvature, const GeometryTraits &gt)
 Calculate the curvature for a mesh. More...
 
template<typename HalfedgeGraph , typename VertexCurvatureMap , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void calculate_curvature (const HalfedgeGraph &g, VertexCurvatureMap &v_cm, const PointMap &pm, const FaceNormalMap &f_nm, bool is_geod, double radius, double &min_nrm_min_curvature, double &max_nrm_min_curvature, double &min_nrm_max_curvature, double &max_nrm_max_curvature)
 Calculate the curvature for a mesh. More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits , typename FaceNormalMap , typename HalfEdge , typename CamType , typename LightType , typename DirType >
double compute_visibility (const GeometryTraits &geom, const PointMap &point_map, const HalfedgeGraph &mesh, const FaceNormalMap &f_nm, const HalfEdge &halfedge, const DirType &displacement, const LightType &light, const CamType &cam, const ScreenParam &screen, const UserParam &user, const SceneParam &scene, const NWHWD16_Threshold &threshold, bool both_faces_move=true)
 Compute the visibility of the movement of an halfedge, given a light source and the displacement. More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits , typename FaceNormalMap , typename VertexType , typename CamType , typename LightType , typename DirType >
double compute_threshold (const GeometryTraits &geom, const PointMap &point_map, const HalfedgeGraph &mesh, const FaceNormalMap &f_nm, const VertexType &vertex, const DirType &dir, const LightType &light, const CamType &cam, const ScreenParam &screen, const UserParam &user, const SceneParam &scene, const NWHWD16_Threshold &threshold, double max_displacement)
 Compute the JND value for a vertex, using a given light. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename FaceNormalMap , typename JNDMap >
void just_noticeable_distortion_filter (const HalfedgeGraph &halfedge_graph, PointMap &point_map, const VertexNormalMap &vertex_normal_map, const GeometryTraits &geometry_traits, const FaceNormalMap &face_normal_map, JNDMap &jnd_map, const ScreenParam &screen, const UserParam &user, const SceneParam &scene, const int nb_light_sources, bool data_output=false, bool use_random=true)
 Computes the Just Noticeable Distortion metric. More...
 
template<typename HalfedgeGraph , typename PointMap , typename VertexNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename FaceNormalMap , typename JNDMap >
void just_noticeable_distortion_filter (const HalfedgeGraph &g, PointMap &pm, const VertexNormalMap &v_nm, const FaceNormalMap &f_nm, JNDMap &jnd_m, const ScreenParam &screen, const UserParam &user, const SceneParam &scene, const int lights=128, bool data_output=false, bool use_random=true)
 Computes the Just Noticeable Distortion metric. More...
 
FEVV::Types::Imagemake_no_texture_image (void)
 
template<typename HalfedgeGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits >
void mesh_from_vector_representation (HalfedgeGraph &g, FEVV::PMapsContainer &pmaps, unsigned int &dup_v_nbr, FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &mvr, MeshFromVectorReprParameters< HalfedgeGraph > const &params, const GeometryTraits &)
 Build the mesh from the given vector representation. More...
 
template<typename HalfedgeGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void mesh_from_vector_representation (const HalfedgeGraph &g, const FEVV::PMapsContainer &pmaps, unsigned int &dup_v_nbr, FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &mvr, MeshFromVectorReprParameters< HalfedgeGraph > const &params=MeshFromVectorReprParameters< HalfedgeGraph >())
 Build the mesh from the given vector representation. More...
 
template<typename FaceListGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits >
void mesh_to_vector_representation (const FaceListGraph &g, const FEVV::PMapsContainer &pmaps, FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &mvr, const GeometryTraits &)
 Build the vector representation of the mesh. More...
 
template<typename FaceListGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits = FEVV::Geometry_traits< FaceListGraph >>
void mesh_to_vector_representation (const FaceListGraph &g, const FEVV::PMapsContainer &pmaps, FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &mvr)
 Build the vector representation of the mesh. More...
 
template<typename Descriptor , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void compute_min_max_descriptor (const Descriptor &d, const PropertyMap &prop_map, MapType &min_metric, MapType &max_metric)
 Generic call to compute min max from a Descriptor Get the value of the property map for the given descriptor and update minMetric and maxMetric accordingly. More...
 
template<typename HalfedgeGraph , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void compute_min_max_faces (const HalfedgeGraph &g, const PropertyMap &prop_map, MapType &min_metric, MapType &max_metric)
 Compute min and max value of a numerical property map for the faces of a mesh. More...
 
template<typename HalfedgeGraph , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void compute_min_max_vertices (const HalfedgeGraph &g, const PropertyMap &prop_map, MapType &min_metric, MapType &max_metric)
 Compute min and max value of a numerical property map for the vertices of a mesh. More...
 
template<typename HalfedgeGraph , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void compute_min_max_halfedges (const HalfedgeGraph &g, const PropertyMap &prop_map, MapType &min_metric, MapType &max_metric)
 Compute min and max value of a numerical property map for the halfedges of a mesh. More...
 
template<typename Iterator , typename PropertyMap , typename GeometryTraits >
void normalize_vector_map (const Iterator &begin, const Iterator &end, PropertyMap &prop_map, const GeometryTraits &gt)
 Normalize each vector of a property map, one by one. Generic implementation. More...
 
template<typename HalfedgeGraph , typename PropertyMap >
void normalize_vector_map_vertices (const HalfedgeGraph &g, PropertyMap &prop_map)
 Normalize each vector of the vertex property map. More...
 
template<typename HalfedgeGraph , typename PropertyMap >
void normalize_vector_map_faces (const HalfedgeGraph &g, PropertyMap &prop_map)
 Normalize each vector of the face property map. More...
 
template<typename HalfedgeGraph , typename PropertyMap >
void normalize_vector_map_edges (const HalfedgeGraph &g, PropertyMap &prop_map)
 Normalize each vector of the edge property map. More...
 
template<typename HalfedgeGraph , typename PropertyMap >
void normalize_vector_map_halfedges (const HalfedgeGraph &g, PropertyMap &prop_map)
 Normalize each vector of the halfedge property map. More...
 
template<typename PointCloudS , typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_point_cloud (const PointCloudS &pc_s, const PMapsContainer &pmaps_s, PointCloudT &pc_t, PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &)
 Copy a source point cloud into a target point cloud. Copy standard properties too. More...
 
template<typename PointCloudS , typename PointCloudT , typename Parameters , typename GeometryTraitsS = FEVV::Geometry_traits< PointCloudS >, typename GeometryTraitsT = FEVV::Geometry_traits< PointCloudT >>
void copy_point_cloud (const PointCloudS &pc_s, const PMapsContainer &pmap_s, PointCloudT &pc_t, PMapsContainer &pmap_t, const Parameters &params=CopyPCParameters< PointCloudS, PointCloudT >())
 Copy a source point cloud into a target point cloud. Copy standard properties too. More...
 
template<typename PointCloud , typename VertexCurvatureMap >
void compute_mean_stdev_curvature (const PointCloud &pc, const VertexCurvatureMap &v_curvm, double &mean, double &stdev)
 Compute mean and stdev of curvature. More...
 
template<typename PointCloud , typename VertexCurvatureMap , typename VertexColorMap >
void curvature_to_color (const PointCloud &pc, const VertexCurvatureMap &v_curvm, VertexColorMap &v_cm)
 Convert a curvature map to a color map. More...
 
template<typename Point , typename PointMap , typename NNIdsVector , typename GeometryTraits >
double curvature_at_point (const Point &origin, const PointMap &pm, const NNIdsVector &neighbors_ids, const GeometryTraits &gt)
 Compute the curvature at origin point using a set of neighbors given by a list of indices. More...
 
template<typename PointCloud , typename PointMap , typename VertexCurvatureMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void point_cloud_curvature (const PointCloud &pc, const PointMap &pm, unsigned int k, double radius, VertexCurvatureMap &v_curvm, VertexColorMap &v_cm, const GeometryTraits &gt)
 Compute the curvature for each point of the point cloud using the nearest neighbors. More...
 
template<typename PointCloud , typename PointMap , typename VertexCurvatureMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void point_cloud_curvature (const PointCloud &pc, const PointMap &pm, unsigned int k, double radius, VertexCurvatureMap &v_curvm, VertexColorMap &v_cm)
 Compute the curvature for each point of the point cloud. Helper function to simplify the call to the filter. More...
 
template<typename PointCloud , typename PointMap , typename NormalMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void compute_weighted_pca (const PointCloud &pointCloud, const PointMap &pointMap, NormalMap &normalMap, int n_neight, float noise, float curvature, const GeometryTraits &gt)
 
template<typename PointCloud , typename PointMap , typename NormalMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void compute_weighted_pca (const PointCloud &pointCloud, const PointMap &pointMap, NormalMap &normalMap, int n_neight, float noise, float curvature)
 
template<typename HalfedgeGraph , typename NormalMap >
void print_face_normals (const HalfedgeGraph &g, NormalMap nm)
 Print all faces normals. More...
 
template<typename HalfedgeGraph , typename PointMap >
void print_points (const HalfedgeGraph &g, PointMap pm)
 Print all vertices coordinates. More...
 
template<typename PropertyGraph , typename PointMap , typename NewPointMap , typename GeometryTraits = FEVV::Geometry_traits< PropertyGraph >>
void reposition_vertices (const PropertyGraph &g, PointMap pm, const NewPointMap &smoothed_pm, const GeometryTraits &)
 Apply new vertex positions to vertex position property map. More...
 
template<typename PropertyGraph , typename PointMap , typename NewPointMap , typename GeometryTraits = FEVV::Geometry_traits< PropertyGraph >>
void reposition_vertices (const PropertyGraph &g, PointMap pm, const NewPointMap &smoothed_pm)
 
template<typename Graph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< Graph >>
void calculate_scaling (Graph &g, PointMap &pm, typename GeometryTraits::Scalar scale_x, typename GeometryTraits::Scalar scale_y, typename GeometryTraits::Scalar scale_z, const GeometryTraits &gt)
 Scale a mesh. More...
 
template<typename Graph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< Graph >>
void calculate_scaling (Graph &g, PointMap &pm, typename GeometryTraits::Scalar scale_x, typename GeometryTraits::Scalar scale_y, typename GeometryTraits::Scalar scale_z)
 Scale a mesh. More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void translate (const HalfedgeGraph &g, PointMap &pm, typename GeometryTraits::Scalar offset_x, typename GeometryTraits::Scalar offset_y, typename GeometryTraits::Scalar offset_z, const GeometryTraits &gt)
 Translate a mesh. More...
 
template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void translate (const HalfedgeGraph &g, PointMap &pm, typename GeometryTraits::Scalar offset_x, typename GeometryTraits::Scalar offset_y, typename GeometryTraits::Scalar offset_z)
 Translate a mesh. More...
 
template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const FEVV::PCLPointCloud &pc_s, const FEVV::PMapsContainer &pmaps_s, PointCloudT &pc_t, FEVV::PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Overloading of copy_graph() for PCL Point Cloud (copy from). More...
 
template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const PointCloudT &pc_s, const FEVV::PMapsContainer &pmaps_s, FEVV::PCLPointCloud &pc_t, FEVV::PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Overloading of copy_graph() for PCL Point Cloud (copy to). More...
 
template<typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void copy_graph (const FEVV::PCLPointCloud &pc_s, const FEVV::PMapsContainer &pmaps_s, FEVV::PCLPointCloud &pc_t, FEVV::PMapsContainer &pmaps_t, const Parameters &params, const GeometryTraitsS &gt_s, const GeometryTraitsT &gt_t)
 Overloading of copy_graph() for PCL Point Cloud (copy from & to). More...
 
void read_mesh (const std::string &filename, FEVV::PCLPointCloud &g, PMapsContainer &pmaps, bool=false)
 Load mesh from file. More...
 
void write_mesh (const std::string &filename, FEVV::PCLPointCloud &g, PMapsContainer &)
 Write mesh to file. More...
 

Typedef Documentation

◆ ColorMeshLUT

typedef std::vector< float > FEVV::Filters::ColorMeshLUT

Definition at line 25 of file color_mesh.h.

◆ FaceDescVect

template<typename FaceGraph >
using FEVV::Filters::FaceDescVect = typedef std::vector< typename boost::graph_traits< FaceGraph >::face_descriptor >

Helper type for face descriptors vector.

Definition at line 79 of file mesh_from_vector_representation.hpp.

◆ FaceToFaceMap

template<typename FaceGraphS , typename FaceGraphT >
using FEVV::Filters::FaceToFaceMap = typedef std::map< typename boost::graph_traits< FaceGraphS >::face_descriptor, typename boost::graph_traits< FaceGraphT >::face_descriptor >

Helper type for face to face map.

Definition at line 41 of file copy_graph.hpp.

◆ PCVertexToVertexMap

template<typename PointCloudS , typename PointCloudT >
using FEVV::Filters::PCVertexToVertexMap = typedef std::map< typename boost::graph_traits< PointCloudS >::vertex_descriptor, typename boost::graph_traits< PointCloudT >::vertex_descriptor >

Helper type for vertex to vertex map.

Definition at line 30 of file copy_point_cloud.hpp.

◆ VertDescVect

template<typename BoostGraph >
using FEVV::Filters::VertDescVect = typedef std::vector< typename boost::graph_traits< BoostGraph >::vertex_descriptor >

Helper type for vertex descriptors vector.

Definition at line 71 of file mesh_from_vector_representation.hpp.

◆ VertexToVertexMap

template<typename BoostGraphS , typename BoostGraphT >
using FEVV::Filters::VertexToVertexMap = typedef std::map< typename boost::graph_traits< BoostGraphS >::vertex_descriptor, typename boost::graph_traits< BoostGraphT >::vertex_descriptor >

Helper type for vertex to vertex map.

Definition at line 31 of file copy_graph.hpp.

Enumeration Type Documentation

◆ BATCH_CONDITION

Enumerator
ALL_EDGES 
REACH_THRESHOLD 

Definition at line 51 of file Batch_collapser.h.

◆ METRIC_TYPE

Enumerator
NO_METRIC 
QEM_3D 

do not use a local metric (not implemented in this release)

EDGE_LENGTH 

memoryless variant of QEM error (Quadric Error Metric)

VOLUME_PRESERVING 

edge length metric

local absolute volume error metric

Definition at line 33 of file Parameters.h.

◆ PREDICTION_TYPE

Enumerator
POSITION 
DELTA 

encode the 2 edge vertex positions

BUTTERFLY 

encode the delta between the 2 edge vertex positions

Definition at line 19 of file Parameters.h.

◆ TOPOLOGY_CASE

Enumerator
CASE11 
CASE12 
CASE13 
CASE211 
CASE212 
CASE221 
CASE222 
SIMPLE 

Definition at line 56 of file Batch_decompressor.h.

◆ VKEPT_POSITION

Enumerator
MIDPOINT 
HALFEDGE 

midpoint position

FULLEDGE 

edge target position

an "optimal" position along the collapsed edge (not implemented in this release)

Definition at line 28 of file Parameters.h.

Function Documentation

◆ boolean_inter() [1/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::boolean_inter ( HalfedgeGraph &  gA,
HalfedgeGraph &  gB,
HalfedgeGraph &  g_out 
)

Computes the intersection of two polyhedra.

    Ref: "Exact and Efficient Booleans for Polyhedra", C. Leconte,
         H. Barki, F. Dupont, Rapport de recherche RR-LIRIS-2010-018,
         2010

    Use the default geometry traits of the mesh.
Parameters
gA1st input mesh
gB2nd input mesh
g_outoutput mesh
See also
the variant that use the geometry traits provided by the user.
Note
For compliance with the general project policy, the point maps of the input and output meshes should be passed as parameters. But the specific implementation of this filter can not use these property maps directly. In order to avoid passing unused parameters, which later triggers compilation warning, it is decided to derogate to the general project policy.

Definition at line 148 of file boolean_operations.hpp.

◆ boolean_inter() [2/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::boolean_inter ( HalfedgeGraph &  gA,
HalfedgeGraph &  gB,
HalfedgeGraph &  g_out,
const GeometryTraits &   
)

Computes the intersection of two polyhedra.

    Ref: "Exact and Efficient Booleans for Polyhedra", C. Leconte,
         H. Barki, F. Dupont, Rapport de recherche RR-LIRIS-2010-018,
         2010
Parameters
gA1st input mesh
gB2nd input mesh
g_outoutput mesh
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.
Note
For compliance with the general project policy, the point maps of the input and output meshes should be passed as parameters. But the specific implementation of this filter can not use these property maps directly. In order to avoid passing unused parameters, which later triggers compilation warning, it is decided to derogate to the general project policy.

Definition at line 115 of file boolean_operations.hpp.

Here is the caller graph for this function:

◆ boolean_minus() [1/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::boolean_minus ( HalfedgeGraph &  gA,
HalfedgeGraph &  gB,
HalfedgeGraph &  g_out 
)

Computes the subtraction of two polyhedra.

    Ref: "Exact and Efficient Booleans for Polyhedra", C. Leconte,
         H. Barki, F. Dupont, Rapport de recherche RR-LIRIS-2010-018,
         2010

    Use the default geometry traits of the mesh.
Parameters
gA1st input mesh
gB2nd input mesh
g_outoutput mesh
See also
the variant that use the geometry traits provided by the user.
Note
For compliance with the general project policy, the point maps of the input and output meshes should be passed as parameters. But the specific implementation of this filter can not use these property maps directly. In order to avoid passing unused parameters, which later triggers compilation warning, it is decided to derogate to the general project policy.

Definition at line 217 of file boolean_operations.hpp.

◆ boolean_minus() [2/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::boolean_minus ( HalfedgeGraph &  gA,
HalfedgeGraph &  gB,
HalfedgeGraph &  g_out,
const GeometryTraits &   
)

Computes the subtraction of two polyhedra.

    Ref: "Exact and Efficient Booleans for Polyhedra", C. Leconte,
         H. Barki, F. Dupont, Rapport de recherche RR-LIRIS-2010-018,
         2010
Parameters
gA1st input mesh
gB2nd input mesh
g_outoutput mesh
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.
Note
For compliance with the general project policy, the point maps of the input and output meshes should be passed as parameters. But the specific implementation of this filter can not use these property maps directly. In order to avoid passing unused parameters, which later triggers compilation warning, it is decided to derogate to the general project policy.

Definition at line 184 of file boolean_operations.hpp.

Here is the caller graph for this function:

◆ boolean_union() [1/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::boolean_union ( HalfedgeGraph &  gA,
HalfedgeGraph &  gB,
HalfedgeGraph &  g_out 
)

Computes the union of two polyhedra.

    Ref: "Exact and Efficient Booleans for Polyhedra", C. Leconte,
         H. Barki, F. Dupont, Rapport de recherche RR-LIRIS-2010-018,
         2010

    Use the default geometry traits of the mesh.
Parameters
gA1st input mesh
gB2nd input mesh
g_outoutput mesh
See also
the variant that use the geometry traits provided by the user.
Note
For compliance with the general project policy, the point maps of the input and output meshes should be passed as parameters. But the specific implementation of this filter can not use these property maps directly. In order to avoid passing unused parameters, which later triggers compilation warning, it is decided to derogate to the general project policy.

Definition at line 79 of file boolean_operations.hpp.

◆ boolean_union() [2/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::boolean_union ( HalfedgeGraph &  gA,
HalfedgeGraph &  gB,
HalfedgeGraph &  g_out,
const GeometryTraits &   
)

Computes the union of two polyhedra.

    Ref: "Exact and Efficient Booleans for Polyhedra", C. Leconte,
         H. Barki, F. Dupont, Rapport de recherche RR-LIRIS-2010-018,
         2010
Parameters
gA1st input mesh
gB2nd input mesh
g_outoutput mesh
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.
Note
For compliance with the general project policy, the point maps of the input and output meshes should be passed as parameters. But the specific implementation of this filter can not use these property maps directly. In order to avoid passing unused parameters, which later triggers compilation warning, it is decided to derogate to the general project policy.

Definition at line 46 of file boolean_operations.hpp.

Here is the caller graph for this function:

◆ calculate_curvature() [1/2]

template<typename HalfedgeGraph , typename VertexCurvatureMap , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::calculate_curvature ( const HalfedgeGraph &  g,
VertexCurvatureMap &  v_cm,
const PointMap &  pm,
const FaceNormalMap &  f_nm,
bool  is_geod,
double  radius,
double &  min_nrm_min_curvature,
double &  max_nrm_min_curvature,
double &  min_nrm_max_curvature,
double &  max_nrm_max_curvature 
)

Calculate the curvature for a mesh.

Parameters
ginput mesh
v_cmoutput vertex curvature map
pmpoint map
f_nmface normal map
isGeodisGeod if true = geodesic neighborhood, if false = 1-ring neighborhood
radiusradius
MinNrmMinCurvatureoutput minimum value of the minimum curvature (usefull for color rendering)
MaxNrmMinCurvatureoutput maximum value of the minimum curvature (usefull for color rendering)
MinNrmMaxCurvatureoutput minimum value of the maximum curvature (usefull for color rendering)
MaxNrmMaxCurvatureoutput maximum value of the maximum curvature (usefull for color rendering)
See also
the variant that use the geometry traits provided by the user.

Definition at line 538 of file curvature.hpp.

Here is the call graph for this function:

◆ calculate_curvature() [2/2]

template<typename HalfedgeGraph , typename VertexCurvatureMap , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::calculate_curvature ( const HalfedgeGraph &  g,
VertexCurvatureMap &  v_cm,
const PointMap &  pm,
const FaceNormalMap &  f_nm,
bool  is_geod,
double  radius,
double &  min_nrm_min_curvature,
double &  max_nrm_min_curvature,
double &  min_nrm_max_curvature,
double &  max_nrm_max_curvature,
const GeometryTraits &  gt 
)

Calculate the curvature for a mesh.

Parameters
ginput mesh
v_cmoutput vertex curvature map
pmpoint map
f_nmface normal map
isGeodisGeod if true = geodesic neighborhood, if false = 1-ring neighborhood
radiusradius
MinNrmMinCurvatureoutput minimum value of the minimum curvature (usefull for color rendering)
MaxNrmMinCurvatureoutput maximum value of the minimum curvature (usefull for color rendering)
MinNrmMaxCurvatureoutput minimum value of the maximum curvature (usefull for color rendering)
MaxNrmMaxCurvatureoutput maximum value of the maximum curvature (usefull for color rendering)
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 312 of file curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_face_normals() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::calculate_face_normals ( const HalfedgeGraph &  g,
const PointMap &  pm,
FaceNormalMap  fnm 
)

Compute all faces normals.

Parameters
gmesh
pmpoint map
fnmface normal map

Definition at line 73 of file calculate_face_normals.hpp.

Here is the call graph for this function:

◆ calculate_face_normals() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits >
void FEVV::Filters::calculate_face_normals ( const HalfedgeGraph &  g,
const PointMap &  pm,
FaceNormalMap  fnm,
const GeometryTraits &  gt 
)

Calculate "some" normal of all the faces of the considered mesh and populate the argument provided Face Normal Map with the resulting normals.

Parameters
[in]gThe considered mesh
[in]pmThe Point Map holding the vertices geometry
[out]fnmThe Property Map that will be populated with the resulting normal vectors.
[in]gtThe Geometry Traits used to perfom the geometrical calculations
Note
: this function name is prefixed with 'calculate_' to mimic CGAL usage of the term 'compute'.

Definition at line 40 of file calculate_face_normals.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_halfedges_tangent()

template<typename HalfedgeGraph , typename PointMap , typename HalfedgeUVMap , typename VertexTangentMap >
void FEVV::Filters::calculate_halfedges_tangent ( const HalfedgeGraph &  g,
const PointMap &  pm,
const HalfedgeUVMap &  hum,
VertexTangentMap &  vtm 
)

Calculate the mesh's tangents from its halfedges.

Parameters
gthe halfedge graph from which we take the mesh's informations.
pmvertices' positions.
humhalfedge UV map containing halfedges' texture coordinates.
vtmvertex tangent map to be filled with computed tangents.
See also
calculate_vertices_tangent() to compute tangents from vertices.

Definition at line 38 of file calculate_halfedges_tangent.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_scaling() [1/2]

template<typename Graph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< Graph >>
void FEVV::Filters::calculate_scaling ( Graph &  g,
PointMap &  pm,
typename GeometryTraits::Scalar  scale_x,
typename GeometryTraits::Scalar  scale_y,
typename GeometryTraits::Scalar  scale_z 
)

Scale a mesh.

Parameters
ginput mesh
pmoutput point map
scaleXx scale factor
scaleYy scale factor
scaleZz scale factor
See also
the variant that use the geometry traits provided by the user.

Definition at line 82 of file scaling.hpp.

◆ calculate_scaling() [2/2]

template<typename Graph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< Graph >>
void FEVV::Filters::calculate_scaling ( Graph &  g,
PointMap &  pm,
typename GeometryTraits::Scalar  scale_x,
typename GeometryTraits::Scalar  scale_y,
typename GeometryTraits::Scalar  scale_z,
const GeometryTraits &  gt 
)

Scale a mesh.

Parameters
ginput mesh
pmoutput point map
scaleXx scale factor
scaleYy scale factor
scaleZz scale factor
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 38 of file scaling.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_vertex_normals() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename VertexNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::calculate_vertex_normals ( const HalfedgeGraph &  g,
const PointMap &  pm,
const FaceNormalMap &  fnm,
VertexNormalMap  vnm 
)

Compute the respectice vertex normal for all the vertices of the considered mesh and populate the argument provided Face Normal Map with the resulting normals.

Note
This function is a syntactic sugar wrapper of the underlying version of the function that requires an additional Geometry_traits as argument.
Parameters
[in]gThe considered mesh.
[in]pmThe Point Map holding the vertices geometry
[in]fnmThe Property Map providing the face normal vectors
[out]vnmThe Property Map that will be populated with the resulting normal vectors.
Parameters
vnmprovided face normals

Definition at line 84 of file calculate_vertex_normals.hpp.

Here is the call graph for this function:

◆ calculate_vertex_normals() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename VertexNormalMap , typename GeometryTraits >
void FEVV::Filters::calculate_vertex_normals ( const HalfedgeGraph &  g,
const PointMap &  pm,
const FaceNormalMap &  fnm,
VertexNormalMap  vnm,
const GeometryTraits &  gt 
)

Compute the respectice vertex normal for all the vertices of the considered mesh and populate the argument provided Face Normal Map with the resulting normals.

See also
Consider using the other version of this function that doesn't require the Geometry_traits as argument.
Parameters
[in]gThe considered mesh.
[in]pmThe Point Map holding the vertices geometry
[in]fnmThe Property Map providing the face normal vectors
[out]vnmThe Property Map that will be populated with the resulting normal vectors.
[in]gtThe Geometry Traits associated to the mesh
Parameters
vnmprovided face normals

Definition at line 41 of file calculate_vertex_normals.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_vertices_one_ring_angles_based_centroid() [1/2]

template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void FEVV::Filters::calculate_vertices_one_ring_angles_based_centroid ( const FaceGraph &  g,
const PointMap &  pm,
CentroidMap  angles_based_centroids_pm,
const typename GeometryTraits::Scalar  smoothing_factor,
const GeometryTraits &  gt 
)

Compute angle-based centroids for all vertices and store them in bangles_based_centroids_pm.

Template Parameters
FaceGrapha Mesh type that provides a Model of the FaceGraph Concept through a boost::graph_traits<> specialization.
PointMapA modifiable point map to manage vertex positions.
CentroidMapA modifiable point map to manage vertex' angle-based centroid.
GeometryTraitsThe geometric kernel when available. This is defaulted to FEVV::Geometry_traits<FaceGraph>.
Parameters
gThe FaceGraph instance from which the vertices will be taken.
pmThe point map which associate a vertex descriptor with a vertex position.
angles_based_centroids_pmThe point map to store the computed vertex centroids.
SMOOTHING_FACTORA (usually positive) factor used to compute the position of a stored centroid following V_pos + SMOOTHING_FACTORx(C_computed - V_pos).
gtThe geometry trait object.
Precondition
g must be a triangular mesh.

Definition at line 49 of file calculate_vertices_one_ring_angles_based_centroid.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_vertices_one_ring_angles_based_centroid() [2/2]

template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void FEVV::Filters::calculate_vertices_one_ring_angles_based_centroid ( const FaceGraph &  g,
const PointMap &  pm,
CentroidMap  angles_based_centroids_pm,
const typename GeometryTraits::Scalar  smoothing_factor = 0.1 
)

Definition at line 87 of file calculate_vertices_one_ring_angles_based_centroid.hpp.

Here is the call graph for this function:

◆ calculate_vertices_one_ring_barycenter() [1/2]

template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void FEVV::Filters::calculate_vertices_one_ring_barycenter ( const FaceGraph &  g,
const PointMap &  pm,
CentroidMap  barycenters_pm,
const typename GeometryTraits::Scalar  smoothing_factor,
const GeometryTraits &  gt 
)

Compute barycenters for all vertices and store them in barycenters_pm.

Template Parameters
FaceGrapha Mesh type that provides a Model of the FaceGraph Concept through a boost::graph_traits<> specialization.
PointMapA modifiable point map to manage vertex positions.
CentroidMapA modifiable point map to manage vertex' barycenter.
GeometryTraitsThe geometric kernel when available. This is defaulted to FEVV::Geometry_traits<FaceGraph>.
Parameters
gThe FaceGraph instance from which the vertices will be taken.
pmThe point map which associate a vertex descriptor with a vertex position.
barycenters_pmThe point map to store the computed vertex centroids.
SMOOTHING_FACTORA (usually positive) factor used to compute the position of a stored centroid following V_pos + SMOOTHING_FACTORx(C_computed - V_pos).
gtThe geometry trait object.
Precondition
g must be a triangular mesh.

Definition at line 47 of file calculate_vertices_one_ring_barycenter.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_vertices_one_ring_barycenter() [2/2]

template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void FEVV::Filters::calculate_vertices_one_ring_barycenter ( const FaceGraph &  g,
const PointMap &  pm,
CentroidMap  barycenters_pm,
const typename GeometryTraits::Scalar  smoothing_factor = 0.1 
)

Definition at line 82 of file calculate_vertices_one_ring_barycenter.hpp.

Here is the call graph for this function:

◆ calculate_vertices_one_ring_geometric_laplacian() [1/2]

template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void FEVV::Filters::calculate_vertices_one_ring_geometric_laplacian ( const FaceGraph &  g,
const PointMap &  pm,
CentroidMap  geom_laplacians_pm,
const typename GeometryTraits::Scalar  smoothing_factor,
const GeometryTraits &  gt 
)

Compute geometric laplacians for all vertices and store them in geom_laplacians_pm.

Template Parameters
FaceGrapha Mesh type that provides a Model of the FaceGraph Concept through a boost::graph_traits<> specialization.
PointMapA modifiable point map to manage vertex positions.
CentroidMapA modifiable point map to manage vertex' geometric laplacians.
GeometryTraitsThe geometric kernel when available. This is defaulted to FEVV::Geometry_traits<FaceGraph>.
Parameters
gThe FaceGraph instance from which the vertices will be taken.
pmThe point map which associate a vertex descriptor with a vertex position.
geom_laplacians_pmThe point map to store the computed vertex geometric laplacians.
smoothing_factorA (usually positive) factor used to compute the position of a stored geometric laplacian following V_pos + smoothing_factor x(GL_computed - V_pos).
gtThe geometry trait object.
Precondition
g must be a triangular mesh.

Definition at line 49 of file calculate_vertices_one_ring_geometric_laplacian.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_vertices_one_ring_geometric_laplacian() [2/2]

template<typename FaceGraph , typename PointMap , typename CentroidMap , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
void FEVV::Filters::calculate_vertices_one_ring_geometric_laplacian ( const FaceGraph &  g,
const PointMap &  pm,
CentroidMap  geom_laplacians_pm,
const typename GeometryTraits::Scalar  smoothing_factor = 0.1 
)

Definition at line 83 of file calculate_vertices_one_ring_geometric_laplacian.hpp.

Here is the call graph for this function:

◆ calculate_vertices_tangent()

template<typename HalfedgeGraph , typename PointMap , typename VertexUVMap , typename VertexTangentMap >
void FEVV::Filters::calculate_vertices_tangent ( const HalfedgeGraph &  g,
const PointMap &  pm,
const VertexUVMap &  vum,
VertexTangentMap &  vtm 
)

Calculate the mesh's tangents from its vertices.

Parameters
gthe halfedge graph from which we take the mesh's informations.
pmpoint map containing vertices' positions.
vumvertex UV map containing vertices' texture coordinates.
vtmvertex tangent map to be filled with computed tangents.
See also
calculate_halfedges_tangent() to compute tangents from halfedges.
Parameters
vtmprovided vertex UVs

Definition at line 38 of file calculate_vertices_tangent.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clean_topology()

template<typename FaceGraph >
bool FEVV::Filters::clean_topology ( FaceGraph &  g,
bool  remove_isolated_vertices = true,
bool  remove_isolated_edges = true,
bool  remove_isolated_faces = false,
bool  remove_similar_edges = true,
bool  remove_similar_faces = true 
)

Function use for cleaning the topology of mesh g. This can be seen as a preprocessing step for some geometry processing algorithms.

Template Parameters
FaceGrapha Mesh type that provides a Model of the FaceGraph Concept through a boost::graph_traits<> specialization.
Parameters
[in,out]gThe FaceGraph instance.
[in]remove_isolated_verticesBoolean to remove isolated vertices if true.
[in]remove_isolated_edgesBoolean to remove isolated edges if true.
[in]remove_isolated_facesBoolean to remove isolated faces if true.
[in]remove_similar_edgesBoolean to remove similar/parallel edges if true.
[in]remove_similar_facesBoolean to remove similar/parallel faces if true.
Returns
true if a topology change has been done, false othewise.

Definition at line 46 of file clean_topology.hpp.

Here is the call graph for this function:

◆ color_descriptor_from_bool()

template<typename Descriptor , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void FEVV::Filters::color_descriptor_from_bool ( const Descriptor &  d,
const BooleanMap &  prop_map,
ColorMap &  color_pmap,
const Color color1,
const Color color2 
)

Set the color for the descriptor using a boolean property map and the colors given.

Parameters
dDescriptor used as key for the property map
prop_mapProperty map containing boolean values
color_pmapProperty map containing color values
color1color when the property is true
color2color when the property is false

Definition at line 290 of file color_mesh.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ color_descriptor_from_map()

template<typename Descriptor , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::color_descriptor_from_map ( const Descriptor &  d,
const PropertyMap &  prop_map,
ColorMap &  color_pmap,
const MapType  min_metric,
const MapType  max_metric,
const ColorMeshLUT colors 
)

Set the color for the descriptor using a numerical property map and the color array given.

Parameters
dDescriptor used as key for the property map
prop_mapProperty map containing numerical values
color_pmapProperty map containing color values
minMetricminimum value of the property map
maxMetricmaximum value of the property map
colors1D array of size N*3

Definition at line 105 of file color_mesh.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ color_edge()

template<typename HalfedgeGraph , typename PointMap , typename EdgeColorMap , typename edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor>
void FEVV::Filters::color_edge ( HalfedgeGraph &  ,
PointMap &  ,
EdgeColorMap &  e_cm,
edge_descriptor  edge_to_color,
typename boost::property_traits< EdgeColorMap >::value_type  color 
)

Colors an edge by putting the specified color into the edge color map at the "edge" position. Used for debug purpose.

Definition at line 36 of file apply_color.h.

Here is the call graph for this function:

◆ color_faces_from_bool_map()

template<typename HalfedgeGraph , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void FEVV::Filters::color_faces_from_bool_map ( const HalfedgeGraph &  g,
const BooleanMap &  prop_map,
ColorMap &  color_pmap,
const Color color1,
const Color color2 
)

Fill the color map for the faces of a mesh using a boolean property map.

Parameters
gmesh to color
prop_mapProperty map containing boolean values
color_pmapProperty map containing color values
color1color when the property is true
color2color when the property is false

Definition at line 324 of file color_mesh.h.

Here is the call graph for this function:

◆ color_faces_from_map()

template<typename HalfedgeGraph , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::color_faces_from_map ( const HalfedgeGraph &  g,
const PropertyMap &  prop_map,
ColorMap &  color_pmap,
const MapType  min_metric,
const MapType  max_metric,
const ColorMeshLUT colors = make_LUT() 
)

Fill the color map for the faces of a mesh using a numerical property map.

Parameters
gmesh to colorize
prop_mapproperty map containing numerical values
color_pmapproperty map containing color values
minMetricminimum value of the property map
maxMetricmaximum value of the property map
colors1D array of size N*3

Definition at line 172 of file color_mesh.h.

Here is the call graph for this function:

◆ color_halfedge_from_bool_map()

template<typename HalfedgeGraph , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void FEVV::Filters::color_halfedge_from_bool_map ( const HalfedgeGraph &  g,
const BooleanMap &  prop_map,
ColorMap &  color_pmap,
const Color color1,
const Color color2 
)

Fill the color map for the halfedges of a mesh using a boolean property map.

Parameters
gmesh to color
prop_mapProperty map containing boolean values
color_pmapProperty map containing color values
color1color when the property is true
color2color when the property is false

Definition at line 388 of file color_mesh.h.

Here is the call graph for this function:

◆ color_halfedges_from_map()

template<typename HalfedgeGraph , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::color_halfedges_from_map ( const HalfedgeGraph &  g,
const PropertyMap &  prop_map,
ColorMap &  color_pmap,
const MapType  min_metric,
const MapType  max_metric,
const ColorMeshLUT colors = make_LUT() 
)

Fill the color map for the halfedges of a mesh using a numerical property map.

Parameters
gmesh to colorize
prop_mapproperty map containing numerical values
color_pmapproperty map containing color values
minMetricminimum value of the property map
maxMetricmaximum value of the property map
colors1D array of size N*3

Definition at line 250 of file color_mesh.h.

Here is the call graph for this function:

◆ color_vertex()

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor>
void FEVV::Filters::color_vertex ( HalfedgeGraph &  ,
PointMap &  ,
VertexColorMap &  v_cm,
vertex_descriptor  vertex_to_color,
typename boost::property_traits< VertexColorMap >::value_type  color 
)

Colors a vertex by putting the specified color into the vertex color map at the "vertex" position. Used for debug purpose.

Definition at line 56 of file apply_color.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ color_vertices_from_bool_map()

template<typename HalfedgeGraph , typename BooleanMap , typename ColorMap , typename Color = typename boost::property_traits< ColorMap >::value_type>
void FEVV::Filters::color_vertices_from_bool_map ( const HalfedgeGraph &  g,
const BooleanMap &  prop_map,
ColorMap &  color_pmap,
const Color color1,
const Color color2 
)

Fill the color map for the vertices of a mesh using a boolean property map.

Parameters
gmesh to color
prop_mapProperty map containing boolean values
color_pmapProperty map containing color values
color1color when the property is true
color2color when the property is false

Definition at line 356 of file color_mesh.h.

Here is the call graph for this function:

◆ color_vertices_from_map()

template<typename HalfedgeGraph , typename PropertyMap , typename ColorMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::color_vertices_from_map ( const HalfedgeGraph &  g,
const PropertyMap &  prop_map,
ColorMap &  color_pmap,
const MapType  min_metric,
const MapType  max_metric,
const ColorMeshLUT colors = make_LUT() 
)

Fill the color map for the vertices of a mesh using a numerical property map.

Parameters
gmesh to colorize
prop_mapproperty map containing numerical values
color_pmapproperty map containing color values
minMetricminimum value of the property map
maxMetricmaximum value of the property map
colors1D array of size N*3

Definition at line 211 of file color_mesh.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compression_valence() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string FEVV::Filters::compression_valence ( HalfedgeGraph &  g,
PointMap *  pm,
VertexColorMap *  v_cm,
const std::string &  input_filename,
const std::string &  output_filename,
bool  with_compression,
bool  with_adaptative_quantization,
int  max_vertices,
int  quantiz_bits,
const GeometryTraits &   
)

Compress the input mesh using the Compression Valence algorithm.

    Ref: Ho Lee, Guillaume Lavoué and Florent Dupont, Rate-distortion
    optimization for progressive compression of 3D mesh with color
    attributes, The Visual Computer, vol. 28, No. 2, pp. 137-153, 2012.
    https://perso.liris.cnrs.fr/guillaume.lavoue/travaux/revue/VC2011.pdf
Parameters
ginput mesh
pmpoint map
v_cmvertex color map if any, nullptr allowed
input_filenamename of the input mesh file (only used to known the input file size and compute the compression rate) ; empty allowed
output_filenamename of the compressed mesh file
with_compressioncompression flag ; if set to false, only mesh simplification is done
with_adaptative_quantizationadaptative quantization flag ; if set to false, no adaptative quantization is done
max_verticesmaximum number of vertices of the final mesh
quantiz_bitsnumber of quantization bits
gtthe geometry traits to use
Returns
string containing some stats about compression (final vertices number, number of layers, calculation time...)
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 54 of file compression_valence.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compression_valence() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string FEVV::Filters::compression_valence ( HalfedgeGraph &  g,
PointMap *  pm,
VertexColorMap *  v_cm,
const std::string &  input_filename,
const std::string &  output_filename,
bool  with_compression = false,
bool  with_adaptative_quantization = false,
int  max_vertices = 100,
int  quantiz_bits = 10 
)

Compress the input mesh using the Compression Valence algorithm.

    Ref: Ho Lee, Guillaume Lavoué and Florent Dupont, Rate-distortion
    optimization for progressive compression of 3D mesh with color
    attributes, The Visual Computer, vol. 28, No. 2, pp. 137-153, 2012.
    https://perso.liris.cnrs.fr/guillaume.lavoue/travaux/revue/VC2011.pdf

    Use the default geometry traits of the mesh.
Parameters
ginput mesh
pmpoint map
v_cmvertex color map if any, nullptr allowed
input_filenamename of the input mesh file (only used to known the input file size and compute the compression rate) ; empty allowed
output_filenamename of the compressed mesh file
with_compressioncompression flag ; if set to false, only mesh simplification is done
with_adaptative_quantizationadaptative quantization flag ; if set to false, no adaptative quantization is done
max_verticesmaximum number of vertices of the final mesh
quantiz_bitsnumber of quantization bits
Returns
string containing some stats about compression (final vertices number, number of layers, calculation time...)
See also
the variant that use the geometry traits provided by the user.

Definition at line 125 of file compression_valence.h.

Here is the call graph for this function:

◆ compute_color_statistics()

template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename CMDMNearestMap >
void FEVV::Filters::compute_color_statistics ( const HalfedgeGraph &  ,
const PointMap &  pm_degr,
const CMDMNearestMap &  nearest_pmap,
const VertexIterator  p_vertex,
std::vector< std::array< double, 3 > > &  tab_color1,
std::vector< std::array< double, 3 > > &  tab_color2,
std::vector< CGALPoint > &  tab_point1,
std::vector< CGALPoint > &  tab_point2,
double *  tab_f4,
double *  tab_f5,
double *  tab_f6,
double *  tab_f7,
double *  tab_f8,
double  radius 
)

Calculates the local color-based features per vertex.

Parameters
pVertexThe considered vertex
TabColor1Color values (L,A,B) from the neighborhood of pVertex regarding the first polyhedron
TabColor2Color values (L,A,B) from the neighborhood of pVertex regarding the second polyhedron
TabPoint13D points from the neighborhood of pVertex regarding the first polyhedron
TabPoint23D points from the neighborhood of pVertex regarding the second polyhedron
radiusThe radius of the neighborhood.

Definition at line 214 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_geometry_statistics()

template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename CMDMNearestMap >
void FEVV::Filters::compute_geometry_statistics ( const HalfedgeGraph &  ,
const PointMap &  pm_degr,
const CMDMNearestMap &  nearest_pmap,
const VertexIterator  p_vertex,
std::vector< double > &  tab_distance1,
std::vector< double > &  tab_distance2,
std::vector< CGALPoint > &  tab_point1,
std::vector< CGALPoint > &  tab_point2,
double *  tab_f1,
double *  tab_f2,
double *  tab_f3,
double  radius 
)

Calculates the local geometry-based features per vertex.

Parameters
pVertexThe considered vertex
TabDistance1Curvature values from the neighborhood of pVertex regarding the first polyhedron
TabDistance2Curvature values from the neighborhood of pVertex regarding the second polyhedron
TabPoint13D points from the neighborhood of pVertex regarding the first polyhedron
TabPoint23D points from the neighborhood of pVertex regarding the second polyhedron
radiusThe radius of the neighborhood.

Definition at line 112 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_mean_stdev_curvature()

template<typename PointCloud , typename VertexCurvatureMap >
void FEVV::Filters::compute_mean_stdev_curvature ( const PointCloud &  pc,
const VertexCurvatureMap &  v_curvm,
double &  mean,
double &  stdev 
)

Compute mean and stdev of curvature.

Parameters
pcthe point cloud
v_curvmthe vertex curvature map
meanoutput value of mean
stdevoutput value of stdev

Definition at line 35 of file point_cloud_curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_mesh_bounding_box()

template<typename PropertyGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< PropertyGraph >>
void FEVV::Filters::compute_mesh_bounding_box ( const PropertyGraph &  g,
const PointMap &  pm,
typename boost::property_traits< PointMap >::value_type &  min_aabb,
typename boost::property_traits< PointMap >::value_type &  max_aabb,
const GeometryTraits &  gt 
)

Compute the mesh Axis-Aligned Bounding-Box (AABB).

Template Parameters
PropertyGrapha Mesh type that provides a Model of the PropertyGraph Concept through a boost::graph_traits<> specialization.
PointMapA modifiable point map to manage vertex positions.
GeometryTraitsThe geometric kernel when available. This is defaulted to FEVV::Geometry_traits<PropertyGraph>.
Parameters
gThe PropertyGraph instance from which the vertices will be taken.
pmThe point map which associate a vertex descriptor with a vertex position.
smoothed_pmThe point map used to replace the vertex positions in pm.
gtThe geometry trait object.

Definition at line 38 of file compute_mesh_bounding_box.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_min_max_descriptor()

template<typename Descriptor , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::compute_min_max_descriptor ( const Descriptor &  d,
const PropertyMap &  prop_map,
MapType &  min_metric,
MapType &  max_metric 
)

Generic call to compute min max from a Descriptor Get the value of the property map for the given descriptor and update minMetric and maxMetric accordingly.

Parameters
dDescriptor used as key for the property map
prop_mapProperty map containing numerical values
minMetricminimum value of the property map
maxMetricmaximum value of the property map

Definition at line 35 of file minmax_map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_min_max_faces()

template<typename HalfedgeGraph , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::compute_min_max_faces ( const HalfedgeGraph &  g,
const PropertyMap &  prop_map,
MapType &  min_metric,
MapType &  max_metric 
)

Compute min and max value of a numerical property map for the faces of a mesh.

Parameters
gmesh with the property map
prop_mapProperty map containing numerical values
minMetricminimum value of the property map
maxMetricmaximum value of the property map

Definition at line 62 of file minmax_map.h.

Here is the call graph for this function:

◆ compute_min_max_halfedges()

template<typename HalfedgeGraph , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::compute_min_max_halfedges ( const HalfedgeGraph &  g,
const PropertyMap &  prop_map,
MapType &  min_metric,
MapType &  max_metric 
)

Compute min and max value of a numerical property map for the halfedges of a mesh.

Parameters
gmesh with the property map
prop_mapProperty map containing numerical values
minMetricminimum value of the property map
maxMetricmaximum value of the property map

Definition at line 123 of file minmax_map.h.

Here is the call graph for this function:

◆ compute_min_max_vertices()

template<typename HalfedgeGraph , typename PropertyMap , typename MapType = typename PropertyMap::value_type>
void FEVV::Filters::compute_min_max_vertices ( const HalfedgeGraph &  g,
const PropertyMap &  prop_map,
MapType &  min_metric,
MapType &  max_metric 
)

Compute min and max value of a numerical property map for the vertices of a mesh.

Parameters
gmesh with the property map
prop_mapProperty map containing numerical values
minMetricminimum value of the property map
maxMetricmaximum value of the property map

Definition at line 92 of file minmax_map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_simple_stencil()

template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void FEVV::Filters::compute_simple_stencil ( HalfedgeGraph &  g,
vertex_descriptor  v,
std::set< halfedge_descriptor > &  forbidden_edges,
std::vector< halfedge_descriptor > &  edges_to_color 
)

Definition at line 91 of file stencil.h.

Here is the call graph for this function:

◆ compute_statistics()

template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename MSDM2NearestMap , typename MSDM2Map >
void FEVV::Filters::compute_statistics ( const HalfedgeGraph &  ,
const PointMap &  pm_degr,
const MSDM2NearestMap &  nearest_pmap,
MSDM2Map &  msdm2_map,
const VertexIterator  p_vertex,
double  param,
std::vector< double > &  tab_distance1,
std::vector< double > &  tab_distance2,
std::vector< CGALPoint > &  tab_point1,
std::vector< CGALPoint > &  tab_point2,
double  radius,
double   
)

Calculates the local curvature statistics per vertex.

Parameters
pVertexThe considered vertex
TabDistance1Curvature values from the neighborhood of pVertex regarding the first polyhedron
TabDistance2Curvature values from the neighborhood of pVertex regarding the second polyhedron
TabPoint13D points from the neighborhoodof pVertex regarding the first polyhedron
TabPoint23D points from the neighborhood of pVertex regarding the second polyhedron
radiusThe radius of the neighborhood.
dimThe max dimension of the Bounding Box Length.

we then compute the MSDM2_Local value

Definition at line 112 of file msdm2.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_threshold()

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits , typename FaceNormalMap , typename VertexType , typename CamType , typename LightType , typename DirType >
double FEVV::Filters::compute_threshold ( const GeometryTraits &  geom,
const PointMap &  point_map,
const HalfedgeGraph &  mesh,
const FaceNormalMap &  f_nm,
const VertexType &  vertex,
const DirType &  dir,
const LightType light,
const CamType cam,
const ScreenParam screen,
const UserParam user,
const SceneParam scene,
const NWHWD16_Threshold threshold,
double  max_displacement 
)

Compute the JND value for a vertex, using a given light.

Definition at line 182 of file just_noticeable_distortion.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_visibility()

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits , typename FaceNormalMap , typename HalfEdge , typename CamType , typename LightType , typename DirType >
double FEVV::Filters::compute_visibility ( const GeometryTraits &  geom,
const PointMap &  point_map,
const HalfedgeGraph &  mesh,
const FaceNormalMap &  f_nm,
const HalfEdge &  halfedge,
const DirType &  displacement,
const LightType light,
const CamType cam,
const ScreenParam screen,
const UserParam user,
const SceneParam scene,
const NWHWD16_Threshold threshold,
bool  both_faces_move = true 
)

Compute the visibility of the movement of an halfedge, given a light source and the displacement.

Definition at line 49 of file just_noticeable_distortion.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_weighted_pca() [1/2]

template<typename PointCloud , typename PointMap , typename NormalMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void FEVV::Filters::compute_weighted_pca ( const PointCloud &  pointCloud,
const PointMap &  pointMap,
NormalMap &  normalMap,
int  n_neight,
float  noise,
float  curvature 
)

Definition at line 181 of file point_cloud_normal_wpca.hpp.

Here is the call graph for this function:

◆ compute_weighted_pca() [2/2]

template<typename PointCloud , typename PointMap , typename NormalMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void FEVV::Filters::compute_weighted_pca ( const PointCloud &  pointCloud,
const PointMap &  pointMap,
NormalMap &  normalMap,
int  n_neight,
float  noise,
float  curvature,
const GeometryTraits &  gt 
)

Convert generic cloud into raw cloud Raw cloud is the structure used by the original normal computation algorithm

Original algorithm

Definition at line 38 of file point_cloud_normal_wpca.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectivity_encoding()

template<typename HalfedgeGraph , typename PointMap , typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor, typename edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, typename Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::connectivity_encoding ( const HalfedgeGraph &  g,
const PointMap &  ,
Collapse_info< HalfedgeGraph, PointMap > &  mem,
edge_descriptor  starting_edge,
std::list< bool > &  edge_bitmask 
)

Encode vertex to split' one-ring edges to expand. For a vertex to split (represented by a Collapse_info object), will encode
the edges to expand in a binary stream, 1 being an edge that should be expanded and 0 being an edge that should not. Takes as arguments a graph g, a pointmap, a Collapse_info object (again, representing a vertex and many necessary refinement info), the first edge to process (see the encode_connectivity_bitmask function), and the edge/connectivity bitmask (which will receive the connectivity bitstream).

Parameters
memin
starting_edgein/out
edge_bitmaskin min edge (edge with the lowest index in the spanning tree) out

Definition at line 44 of file Connectivity_encoding.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_graph() [1/10]

template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters = CopyGraphParameters< FaceListGraphS, FaceListGraphT >, typename GeometryTraitsS = FEVV::Geometry_traits< FaceListGraphS >, typename GeometryTraitsT = FEVV::Geometry_traits< FaceListGraphT >>
void FEVV::Filters::copy_graph ( const FaceListGraphS &  g_s,
const PMapsContainer pmap_s,
FaceListGraphT &  g_t,
PMapsContainer pmap_t,
const Parameters params = CopyGraphParameters< FaceListGraphS, FaceListGraphT >() 
)

Copy a source mesh into a target mesh. Copy standard properties too.

Parameters
g_sthe mesh to copy from
pmaps_sthe source property maps bag
g_tthe mesh to copy to
pmaps_tthe target property maps bag
paramsthe named parameters
See also
the variant that use the geometry traits provided by the user.

Definition at line 248 of file copy_graph.hpp.

Here is the call graph for this function:

◆ copy_graph() [2/10]

template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const FaceListGraphS &  g_s,
const PMapsContainer pmaps_s,
FaceListGraphT &  g_t,
PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Copy a source mesh into a target mesh. Copy standard properties too.

Parameters
g_sthe mesh to copy from
pmaps_sthe source property maps bag
g_tthe mesh to copy to
pmaps_tthe target property maps bag
paramsthe named parameters
gt_sthe geometry traits of source mesh
gt_tthe geometry traits of target mesh
See also
the simplified variant that use the default geometry traits of the meshes.

Definition at line 96 of file copy_graph.hpp.

Here is the call graph for this function:

◆ copy_graph() [3/10]

template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const FaceListGraphS &  g_s,
FaceListGraphT &  g_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Copy a source mesh into a target mesh. Do NOT Copy properties.

Parameters
g_sthe mesh to copy from
g_tthe mesh to copy to
paramsthe named parameters
gt_sthe geometry traits of source mesh
gt_tthe geometry traits of target mesh
See also
the simplified variant that use the default geometry traits of the meshes.

Definition at line 279 of file copy_graph.hpp.

Here is the call graph for this function:

◆ copy_graph() [4/10]

template<typename FaceListGraphS , typename FaceListGraphT , typename Parameters = CopyGraphParameters< FaceListGraphS, FaceListGraphT >, typename GeometryTraitsS = FEVV::Geometry_traits< FaceListGraphS >, typename GeometryTraitsT = FEVV::Geometry_traits< FaceListGraphT >>
void FEVV::Filters::copy_graph ( const FaceListGraphS &  g_s,
FaceListGraphT &  g_t,
const Parameters params = CopyGraphParameters< FaceListGraphS, FaceListGraphT >() 
)

Copy a source mesh into a target mesh. Do NOT copy properties.

Parameters
g_sthe mesh to copy from
g_tthe mesh to copy to
paramsthe named parameters
See also
the variant that use the geometry traits provided by the user.

Definition at line 308 of file copy_graph.hpp.

Here is the call graph for this function:

◆ copy_graph() [5/10]

template<typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const FEVV::CGALPointSet pc_s,
const FEVV::PMapsContainer pmaps_s,
FEVV::CGALPointSet pc_t,
FEVV::PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Overloading of copy_graph() for copy from CGAL Point Set to CGAL Point Set.

Definition at line 112 of file copy_graph_cgal_point_set.hpp.

Here is the call graph for this function:

◆ copy_graph() [6/10]

template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const FEVV::CGALPointSet pc_s,
const FEVV::PMapsContainer pmaps_s,
PointCloudT &  pc_t,
FEVV::PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Overloading of copy_graph() for CGAL Point Set copy from.

Definition at line 43 of file copy_graph_cgal_point_set.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_graph() [7/10]

template<typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const FEVV::PCLPointCloud pc_s,
const FEVV::PMapsContainer pmaps_s,
FEVV::PCLPointCloud pc_t,
FEVV::PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Overloading of copy_graph() for PCL Point Cloud (copy from & to).

Definition at line 111 of file copy_graph_pcl.hpp.

Here is the call graph for this function:

◆ copy_graph() [8/10]

template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const FEVV::PCLPointCloud pc_s,
const FEVV::PMapsContainer pmaps_s,
PointCloudT &  pc_t,
FEVV::PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Overloading of copy_graph() for PCL Point Cloud (copy from).

Definition at line 43 of file copy_graph_pcl.hpp.

Here is the call graph for this function:

◆ copy_graph() [9/10]

template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const PointCloudT &  pc_s,
const FEVV::PMapsContainer pmaps_s,
FEVV::CGALPointSet pc_t,
FEVV::PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Overloading of copy_graph() for CGAL Point Set copy to.

Definition at line 77 of file copy_graph_cgal_point_set.hpp.

Here is the call graph for this function:

◆ copy_graph() [10/10]

template<typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_graph ( const PointCloudT &  pc_s,
const FEVV::PMapsContainer pmaps_s,
FEVV::PCLPointCloud pc_t,
FEVV::PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &  gt_t 
)

Overloading of copy_graph() for PCL Point Cloud (copy to).

Definition at line 77 of file copy_graph_pcl.hpp.

Here is the call graph for this function:

◆ copy_point_cloud() [1/2]

template<typename PointCloudS , typename PointCloudT , typename Parameters , typename GeometryTraitsS = FEVV::Geometry_traits< PointCloudS >, typename GeometryTraitsT = FEVV::Geometry_traits< PointCloudT >>
void FEVV::Filters::copy_point_cloud ( const PointCloudS &  pc_s,
const PMapsContainer pmap_s,
PointCloudT &  pc_t,
PMapsContainer pmap_t,
const Parameters params = CopyPCParameters< PointCloudS, PointCloudT >() 
)

Copy a source point cloud into a target point cloud. Copy standard properties too.

Parameters
pc_sthe point cloud to copy from
pmaps_sthe source property maps bag
pc_tthe point cloud to copy to
pmaps_tthe target property maps bag
See also
the variant that use the geometry traits provided by the user.

Definition at line 210 of file copy_point_cloud.hpp.

Here is the call graph for this function:

◆ copy_point_cloud() [2/2]

template<typename PointCloudS , typename PointCloudT , typename Parameters , typename GeometryTraitsS , typename GeometryTraitsT >
void FEVV::Filters::copy_point_cloud ( const PointCloudS &  pc_s,
const PMapsContainer pmaps_s,
PointCloudT &  pc_t,
PMapsContainer pmaps_t,
const Parameters params,
const GeometryTraitsS &  gt_s,
const GeometryTraitsT &   
)

Copy a source point cloud into a target point cloud. Copy standard properties too.

Parameters
pc_sthe point cloud to copy from
pmaps_sthe source property maps bag
pc_tthe point cloud to copy to
pmaps_tthe target property maps bag
v2vvertex to vertex map to populate (nullptr allowed)
gt_sthe geometry traits of source point cloud
gt_tthe geometry traits of target point cloud
See also
the simplified variant that use the default geometry traits.

Definition at line 77 of file copy_point_cloud.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ curvature_at_point()

template<typename Point , typename PointMap , typename NNIdsVector , typename GeometryTraits >
double FEVV::Filters::curvature_at_point ( const Point origin,
const PointMap &  pm,
const NNIdsVector &  neighbors_ids,
const GeometryTraits &  gt 
)

Compute the curvature at origin point using a set of neighbors given by a list of indices.

Parameters
origin: Point to be projected.
refpoints: Contains all points from ref points cloud.
indices: Index of points in refpoints cloud used to compute the projection.
proj: Reference containing the point resulting from the projection.
H: Reference containing the mean curvature of the projected point.
Returns
Returns both the projection and the mean curvature (Referenced variables).

Definition at line 123 of file point_cloud_curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ curvature_to_color()

template<typename PointCloud , typename VertexCurvatureMap , typename VertexColorMap >
void FEVV::Filters::curvature_to_color ( const PointCloud &  pc,
const VertexCurvatureMap &  v_curvm,
VertexColorMap &  v_cm 
)

Convert a curvature map to a color map.

Parameters
pcthe point cloud
v_curvmthe vertex curvature map
v_cma vertex color map to store the curvature as a color

Definition at line 76 of file point_cloud_curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompression_valence() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string FEVV::Filters::decompression_valence ( HalfedgeGraph &  g,
PointMap *  pm,
VertexColorMap *  v_cm,
const std::string &  input_filename,
bool &  has_color,
bool  do_write_info,
std::vector< HalfedgeGraph * > *  intermediate_meshes,
std::vector< VertexColorMap * > *  intermediate_vertex_color_maps,
int  stop_level,
bool  do_write_intermediate_meshes,
const GeometryTraits &   
)

Uncompress a mesh compressed with Compression Valence algorithm.

    Ref: Ho Lee, Guillaume Lavoué and Florent Dupont, Rate-distortion
    optimization for progressive compression of 3D mesh with color
    attributes, The Visual Computer, vol. 28, No. 2, pp. 137-153, 2012.
    https://perso.liris.cnrs.fr/guillaume.lavoue/travaux/revue/VC2011.pdf
Parameters
ginput mesh
pmoutput point map
v_cmoutput vertex color map
input_filenamename of the compressed mesh file
do_write_infoif set to true, write some information about decompression progression in a text file .infos.txt
intermediate_meshesif not null, used to store the intermediate meshe corresponding to each compression layer
intermediate_vertexColorMapsif not null, used to store the vertex color map of each intermediate mesh
has_coloroutput parameter, contains true if the compressed mesh has colors
do_write_intermediate_mesheswrite intermediate meshes to files during decompression progression
gtthe geometry traits to use
Returns
string containing some stats about compression (number of layers, calculation time...)
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 59 of file decompression_valence.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompression_valence() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
std::string FEVV::Filters::decompression_valence ( HalfedgeGraph &  g,
PointMap *  pm,
VertexColorMap *  v_cm,
const std::string &  input_filename,
bool &  has_color,
bool  do_write_info = false,
std::vector< HalfedgeGraph * > *  intermediate_meshes = nullptr,
std::vector< VertexColorMap * > *  intermediate_vertex_color_maps = nullptr,
int  stop_level = -1,
bool  do_write_intermediate_meshes = false 
)

Uncompress a mesh compressed with Compression Valence algorithm.

    Ref: Ho Lee, Guillaume Lavoué and Florent Dupont, Rate-distortion
    optimization for progressive compression of 3D mesh with color
    attributes, The Visual Computer, vol. 28, No. 2, pp. 137-153, 2012.
    https://perso.liris.cnrs.fr/guillaume.lavoue/travaux/revue/VC2011.pdf
Parameters
ginput mesh
pmoutput point map
v_cmoutput vertex color map
input_filenamename of the compressed mesh file
do_write_infoif set to true, write some information about decompression progression in a text file .infos.txt
intermediate_meshesif not null, used to store the intermediate meshe corresponding to each compression layer
intermediate_vertexColorMapsif not null, used to store the vertex color map of each intermediate mesh
has_coloroutput parameter, contains true if the compressed mesh has colors
do_write_intermediate_mesheswrite intermediate meshes to files during decompression progression
Returns
string containing some stats about compression (number of layers, calculation time...)
See also
the variant that use the geometry traits provided by the user.

Definition at line 134 of file decompression_valence.h.

Here is the call graph for this function:

◆ edge_selector_for_collapse() [1/2]

template<typename FaceGraph , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
std::vector<typename boost::graph_traits<FaceGraph>::edge_descriptor> FEVV::Filters::edge_selector_for_collapse ( const FaceGraph &  g,
bool  is_g_2_manifold,
bool  forbid_non_satisfying_link_condition,
bool  forbid_non_manifold_edge,
bool  forbid_edge_collapse_creating_non_manifold_split,
bool  forbid_border_edge,
bool  forbid_inner_edge,
bool  forbid_non_triangular_incident_face_to_edge,
bool  forbid_edges_that_are_adjacent_to_collapsed_edges,
bool  forbid_edges_that_are_one_ring_edges_of_collapsed_edge_vertices,
bool  forbid_edges_that_are_incident_to_opposite_vertices_of_collapsed_edge_vertices,
bool  forbid_edges_that_are_incident_to_one_ring_of_collapsed_edge_vertices,
const GeometryTraits &  gt 
)

Function used for cleaning the topology of mesh g. This can be seen as a preprocessing step for some geometry processing algorithms.

Template Parameters
FaceGrapha Mesh type that provides a Model of the FaceGraph Concept through a boost::graph_traits<> specialization.
GeometryTraitsThe geometric kernel when available. This is defaulted to FEVV::Geometry_traits<FaceGraph>.
Parameters
[in]gThe FaceGraph instance.
[in]is_g_2_manifoldBoolean to avoid costly checks when the input g is 2-manifold. If you do not know, chose false.
[in]forbid_non_satisfying_link_conditionBoolean to avoid edge non-satisfaying the link condition.
[in]forbid_non_manifold_edgeBoolean to avoid non-manifold edge.
[in]forbid_edge_collapse_creating_non_manifold_splitBoolean to avoid edge whose collapse creates a non-manifold vertex split.
[in]forbid_border_edgeBoolean to avoid border edge.
[in]forbid_inner_edgeBoolean to avoid inner edge.
[in]forbid_non_triangular_incident_face_to_edgeBoolean to avoid edge whose incident faces are not triangular.
[in]forbid_edges_that_are_adjacent_to_collapsed_edgesBoolean to avoid edge adjacent to already selected edges.
[in]forbid_edges_that_are_one_ring_edges_of_collapsed_edge_verticesBoolean to avoid edge that is onto the one-ring of selected edges' vertices.
[in]forbid_edges_that_are_incident_to_one_ring_of_collapsed_edge_verticesBoolean to avoid edge that is adjacent to edges onto the one-ring of selected edges' vertices.
[in]gtThe Geometry Traits object.
Returns
an std::vector of edge_descriptor corresponding to edges selected from g.

Definition at line 322 of file edge_selector.hpp.

Here is the call graph for this function:

◆ edge_selector_for_collapse() [2/2]

template<typename FaceGraph , typename GeometryTraits = FEVV::Geometry_traits< FaceGraph >>
std::vector<typename boost::graph_traits<FaceGraph>::edge_descriptor> FEVV::Filters::edge_selector_for_collapse ( const FaceGraph &  g,
bool  is_g_2_manifold,
bool  forbid_non_satisfying_link_condition,
bool  forbid_non_manifold_edge,
bool  forbid_edge_collapse_creating_non_manifold_split,
bool  forbid_border_edge,
bool  forbid_inner_edge,
bool  forbid_non_triangular_incident_face_to_edge,
bool  forbid_edges_that_are_adjacent_to_collapsed_edges,
bool  forbid_edges_that_are_one_ring_edges_of_collapsed_edge_vertices,
bool  forbid_edges_that_are_incident_to_opposite_vertices_of_collapsed_edge_vertices,
bool  forbid_edges_that_are_incident_to_one_ring_of_collapsed_edge_vertices,
const std::set< typename boost::graph_traits< FaceGraph >::edge_descriptor > &  external_forbidden_edges_to_collapse,
const GeometryTraits &  gt 
)

Function used for cleaning the topology of mesh g. This can be seen as a preprocessing step for some geometry processing algorithms.

Template Parameters
FaceGrapha Mesh type that provides a Model of the FaceGraph Concept through a boost::graph_traits<> specialization.
GeometryTraitsThe geometric kernel when available. This is defaulted to FEVV::Geometry_traits<FaceGraph>.
Parameters
[in]gThe FaceGraph instance.
[in]is_g_2_manifoldBoolean to avoid costly checks when the input g is 2-manifold. If you do not know, chose false.
[in]forbid_non_satisfying_link_conditionBoolean to avoid edge non-satisfaying the link condition.
[in]forbid_non_manifold_edgeBoolean to avoid non-manifold edge.
[in]forbid_edge_collapse_creating_non_manifold_splitBoolean to avoid edge whose collapse creates a non-manifold vertex split.
[in]forbid_border_edgeBoolean to avoid border edge.
[in]forbid_inner_edgeBoolean to avoid inner edge.
[in]forbid_non_triangular_incident_face_to_edgeBoolean to avoid edge whose incident faces are not triangular.
[in]forbid_edges_that_are_adjacent_to_collapsed_edgesBoolean to avoid edge adjacent to already selected edges.
[in]forbid_edges_that_are_one_ring_edges_of_collapsed_edge_verticesBoolean to avoid edge that is onto the one-ring of selected edges' vertices.
[in]forbid_edges_that_are_incident_to_opposite_vertices_of_collapsed_edge_verticesBoolean to avoid edge that is incident to opposite vertices of the collapsed edge.
[in]forbid_edges_that_are_incident_to_one_ring_of_collapsed_edge_verticesBoolean to avoid edge that is adjacent to edges onto the one-ring of selected edges' vertices.
[in]external_forbidden_edges_to_collapseTo take into account external constraints (e.g. to preserve particular edges).
[in]gtThe Geometry Traits object.
Returns
an std::vector of edge_descriptor corresponding to edges selected from g.

Definition at line 67 of file edge_selector.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_connectivity_bitmask()

template<typename HalfedgeGraph , typename PointMap , typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor, typename edge_descriptor = typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, typename Geometry = typename FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::encode_connectivity_bitmask ( const HalfedgeGraph &  g,
const PointMap &  pm,
std::list< Collapse_info< HalfedgeGraph, PointMap > > &  list_memory,
std::list< bool > &  edge_bitmask,
const FEVV::Comparator::Spanning_tree_vertex_edge_comparator< HalfedgeGraph, PointMap, Geometry > &  spanningtree 
)

Encode vertex to split' one-ring edges to expand, for all collapsed edges in the order of the sorted list list_memory.

Parameters
edge_bitmasksorted list (according to st) but non-const reference due to Collapse_info updates
spanningtreeout in computed st (needed to find the min edges)

Definition at line 105 of file Connectivity_encoding.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fabs()

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double FEVV::Filters::fabs ( const v_Curv< HalfedgeGraph > &  input)

Definition at line 54 of file curvature.hpp.

Here is the caller graph for this function:

◆ fabs_cmdm()

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double FEVV::Filters::fabs_cmdm ( const v_Curv_cmdm< HalfedgeGraph > &  input)

Definition at line 54 of file curvature_cmdm.hpp.

Here is the call graph for this function:

◆ find_vertices_to_forbid()

template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void FEVV::Filters::find_vertices_to_forbid ( HalfedgeGraph &  g,
vertex_descriptor  v,
std::set< vertex_descriptor > &  forbidden_vertices 
)

Definition at line 47 of file stencil.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ forbid_edges()

template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void FEVV::Filters::forbid_edges ( HalfedgeGraph &  g,
vertex_descriptor  v,
std::set< halfedge_descriptor > &  forbidden_edges 
)

Definition at line 69 of file stencil.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ forbid_vertex()

template<typename HalfedgeGraph , typename vertex_descriptor = typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor, typename halfedge_descriptor = typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor>
void FEVV::Filters::forbid_vertex ( HalfedgeGraph &  g,
vertex_descriptor  v,
std::set< halfedge_descriptor > &  forbidden_edges 
)

Definition at line 27 of file stencil.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ geodes_principal_curvature_per_vert()

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void FEVV::Filters::geodes_principal_curvature_per_vert ( const HalfedgeGraph &  g,
const PointMap &  pm,
const FaceNormalMap &  f_nm,
VertexDescriptor  vd,
double  pp_matrix_sum[3][3],
double  radius,
const GeometryTraits &  gt 
)

Definition at line 169 of file curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ geodes_principal_curvature_per_vert_cmdm()

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void FEVV::Filters::geodes_principal_curvature_per_vert_cmdm ( const HalfedgeGraph &  g,
const PointMap &  pm,
const FaceNormalMap &  f_nm,
VertexDescriptor  vd,
double  pp_matrix_sum[3][3],
double  radius,
const GeometryTraits &  gt 
)

Definition at line 181 of file curvature_cmdm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_max_bb_size() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double FEVV::Filters::get_max_bb_size ( const HalfedgeGraph &  g,
PointMap &  pm 
)

Gets the maximum size of the object bounding box. Use the default geometry traits of the mesh.

Parameters
ginput mesh
pmpoint map
Returns
the maximum size of the bounding box.

Definition at line 78 of file get_max_bb_size.hpp.

Here is the call graph for this function:

◆ get_max_bb_size() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double FEVV::Filters::get_max_bb_size ( const HalfedgeGraph &  g,
PointMap &  pm,
GeometryTraits &  gt 
)

Gets the maximum size of the object bounding box.

Parameters
ginput mesh
pmpoint map
gtgeometry traits
Returns
the maximum size of the bounding box.

Definition at line 36 of file get_max_bb_size.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_time_and_reset()

double FEVV::Filters::get_time_and_reset ( std::chrono::time_point< std::chrono::steady_clock > &  time_start)
inline

Measure time since starting time and reset starting time.

Parameters
Startingtime
Returns
Elapsed time in seconds since starting time.

Definition at line 47 of file generic_reader.hpp.

Here is the caller graph for this function:

◆ Get_VertexColorMap()

template<typename HalfedgeGraph , typename VertexColorMap = typename FEVV:: PMap_traits< FEVV::vertex_color_t, MeshSurface >::pmap_type>
VertexColorMap FEVV::Filters::Get_VertexColorMap ( const HalfedgeGraph &  m_poly,
FEVV::PMapsContainer pmaps,
std::vector< double > &  init_grid_L,
std::vector< double > &  grid_L,
std::vector< std::vector< std::pair< double, double > > > &  init_grid_AB 
)

Retrieve the color (RGB values) of each vertex of the mesh and transform it into the working color space LAB2000HL.

Parameters
m_PolyThe Polyhedron.
init_grid_L,grid_L,init_grid_ABGrids used for the color transformation LAB -> LAB2000HL. \Return [out] _LAB2000HL_Vertexcolormap The vertex color map (in LAB2000HL space) of the mesh.

Definition at line 355 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ homogeneous_transform() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::homogeneous_transform ( const HalfedgeGraph &  g,
PointMap &  pm,
const Eigen::Matrix4d &  mat 
)

Calculate the homogeneous transformation of the vertices coordinates using the provided 4x4 homogeneous transformation matrix.

Parameters
[in]gThe considered mesh
[in]pmThe Point Map holding the vertices geometry
[in]matThe 4x4 homogeneous transformation matrix
[in]gtThe Geometry Traits used to perfom the geometrical calculations

Definition at line 92 of file homogeneous_transform.hpp.

Here is the call graph for this function:

◆ homogeneous_transform() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits >
void FEVV::Filters::homogeneous_transform ( const HalfedgeGraph &  g,
PointMap &  pm,
const Eigen::Matrix4d &  mat,
const GeometryTraits &  gt 
)

Calculate the homogeneous transformation of the vertices coordinates using the provided 4x4 homogeneous transformation matrix.

Parameters
[in]gThe considered mesh
[in]pmThe Point Map holding the vertices geometry
[in]matThe 4x4 homogeneous transformation matrix
[in]gtThe Geometry Traits used to perfom the geometrical calculations

Definition at line 38 of file homogeneous_transform.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_triangle_mesh()

template<typename FaceGraph >
bool FEVV::Filters::is_triangle_mesh ( const FaceGraph &  g)
inline

Function determining if mesh g is a pure triangular mesh.

Template Parameters
FaceGrapha Mesh type that provides a Model of the FaceGraph Concept through a boost::graph_traits<> specialization.
Parameters
gThe FaceGraph instance.
Returns
true if all faces of g are triangles.

Definition at line 29 of file is_triangle_mesh.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ just_noticeable_distortion_filter() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename VertexNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename FaceNormalMap , typename JNDMap >
void FEVV::Filters::just_noticeable_distortion_filter ( const HalfedgeGraph &  g,
PointMap &  pm,
const VertexNormalMap &  v_nm,
const FaceNormalMap &  f_nm,
JNDMap &  jnd_m,
const ScreenParam screen,
const UserParam user,
const SceneParam scene,
const int  lights = 128,
bool  data_output = false,
bool  use_random = true 
)

Computes the Just Noticeable Distortion metric.

Parameters
gThe mesh whose JND is computed
pmThe Point map of g
v_nmThe vertices normal map of g
f_nmThe faces normal map of g
jnd_mThe JND map of g (a map from vertex to double)
screenThe screen parameters used (included in models/types.h)
userThe user parameters used (included in models/types.h)
sceneThe scene parameters used (included in models/types.h)
lightsThe number of randomly generated lights around each vertex
use_randomShould we use a randomness to generate the lights ?

Definition at line 558 of file just_noticeable_distortion.hpp.

Here is the call graph for this function:

◆ just_noticeable_distortion_filter() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename VertexNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename FaceNormalMap , typename JNDMap >
void FEVV::Filters::just_noticeable_distortion_filter ( const HalfedgeGraph &  halfedge_graph,
PointMap &  point_map,
const VertexNormalMap &  vertex_normal_map,
const GeometryTraits &  geometry_traits,
const FaceNormalMap &  face_normal_map,
JNDMap &  jnd_map,
const ScreenParam screen,
const UserParam user,
const SceneParam scene,
const int  nb_light_sources,
bool  data_output = false,
bool  use_random = true 
)

Computes the Just Noticeable Distortion metric.

Parameters
halfedge_graphThe mesh whose JND is computed
oint_mapThe Point map of g
vertex_normal_mapThe vertices normal map of g
geometry_traitsThe geometry traits of g
ace_mapThe Face map of g
face_normal_mapThe faces normal map of g
jnd_mapThe JND map of g (a map from vertex to double)
screenThe screen parameters used (included in models/types.h)
userThe user parameters used (included in models/types.h)
sceneThe scene parameters used (included in models/types.h)
nb_light_sourcesThe number of randomly generated lights around each vertex
use_randomShould we use a randomness to generate the lights ?

Definition at line 336 of file just_noticeable_distortion.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kmax_kmean()

template<typename HalfedgeGraph , typename CurvatureVertexMap >
void FEVV::Filters::kmax_kmean ( const HalfedgeGraph &  mesh,
CurvatureVertexMap &  curv_vmap,
const double  coef 
)

Computes the mean curvature field (kmin+kmax)/2 and normalize it according to the size of the model.

Parameters
polyhedron_ptrThe polyhedron.
coefThe normalization coef.

Definition at line 712 of file msdm2.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kmax_kmean_cmdm()

template<typename HalfedgeGraph , typename CurvatureVertexMap >
void FEVV::Filters::kmax_kmean_cmdm ( const HalfedgeGraph &  mesh,
CurvatureVertexMap &  curv_vmap,
const double  coef 
)

Computes the mean curvature field (kmin+kmax)/2 and normalize it according to the size of the model.

Parameters
polyhedron_ptrThe polyhedron.
coefThe normalization coef.

Definition at line 1181 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_LUT()

ColorMeshLUT FEVV::Filters::make_LUT ( bool  color_in_0_255 = true,
unsigned int  colors_nbr = 256,
float  h1 = 240,
float  h2 = 0 
)
inline

Create a RGB LUT based on an HSV range. Default range creates a blue-cyan-green-yellow-red gradient.

Parameters
color_in_0_255if true the RGB values are in [0;255] else they are in [0;1]
colors_nbrnumber of different colors in the LUT
h11st bound of the H range
h22nd bound of the H range
Returns
LUT as a 1D array of size 3*colors_nbr

Definition at line 41 of file color_mesh.h.

Here is the caller graph for this function:

◆ make_no_texture_image()

FEVV::Types::Image* FEVV::Filters::make_no_texture_image ( void  )
inline

Create and return a 256x256 "no tex" image.

Definition at line 33 of file mesh_from_vector_representation.hpp.

Here is the caller graph for this function:

◆ matching_multires_init()

template<typename MSDM2Map , typename HalfedgeGraph , typename MSDM2NearestMap , typename PointMap , typename TagMap , typename FaceIterator = typename boost::graph_traits< HalfedgeGraph >::face_iterator>
void FEVV::Filters::matching_multires_init ( const HalfedgeGraph &  m_poly_degrad,
MSDM2Map &  msdm2m_degrad,
MSDM2NearestMap &  msdm2nm_degrad,
TagMap &  tag_map,
const PointMap &  pm_degrad,
const HalfedgeGraph &  m_poly_original,
CGAL::SM_Face_index *  tab_matched_facet 
)

Initialize the matching process.

Parameters
m_PolyDegradThe first Polyhedron.
m_PolyOriginalThe second Polyhedron.
[out]_TabMatchedFacetFacets from m_PolyOriginal on which vertices from m_PolyDegrad are projected

Definition at line 224 of file msdm2.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matching_multires_init_cmdm()

template<typename CMDMMap , typename HalfedgeGraph , typename CMDMNearestMap , typename TagMap , typename PointMap , typename FaceIterator = typename boost::graph_traits< HalfedgeGraph >::face_iterator>
void FEVV::Filters::matching_multires_init_cmdm ( const HalfedgeGraph &  m_poly_degrad,
CMDMMap &  cmdm_degrad,
CMDMNearestMap &  cmdmm_degrad,
TagMap &  tag_map,
const PointMap &  pm_degrad,
const HalfedgeGraph &  m_poly_original,
CGAL::SM_Face_index *  tab_matched_facet 
)

Initialize the matching process.

Parameters
m_PolyDegradThe first Polyhedron.
m_PolyOriginalThe second Polyhedron.
[out]_TabMatchedFacetFacets from m_PolyOriginal on which vertices from m_PolyDegrad are projected

Definition at line 419 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matching_multires_update() [1/2]

template<typename HalfedgeGraph , typename CurvatureVertexMap , typename CMDMCurvatureMatchMap , typename VertexColorMap >
void FEVV::Filters::matching_multires_update ( const HalfedgeGraph &  m_poly_degrad,
const HalfedgeGraph &  m_poly_orig,
CGALPoint tab_pm_orig,
CGALPoint tab_cmdmm_degrad,
const CurvatureVertexMap  curv_orig,
const VertexColorMap  vcm_orig,
CMDMCurvatureMatchMap  curvmatch_pmap,
VertexColorMap  colmatch_pmap,
CGAL::SM_Face_index *  tab_matched_facet 
)

Updates the matching process.

Parameters
m_PolyDegradThe first Polyhedron.
_TabMatchedFacetFacets from m_PolyOriginal on which vertices from m_PolyDegrad are projected

calculation of the nearest point curvature value using vertices of the Nearest triangle

Definition at line 797 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matching_multires_update() [2/2]

template<typename PointMap , typename HalfedgeGraph , typename CurvatureVertexMap , typename MSMD2CurvatureMatchMap >
void FEVV::Filters::matching_multires_update ( const HalfedgeGraph &  m_poly_degrad,
const PointMap &  pm_degr,
const HalfedgeGraph &  m_poly_orig,
const PointMap &  pm_orig,
const CurvatureVertexMap  curv_orig,
MSMD2CurvatureMatchMap  curvmatch_pmap,
CGAL::SM_Face_index *  tab_matched_facet 
)

Updates the matching process.

Parameters
m_PolyDegradThe first Polyhedron.
_TabMatchedFacetFacets from m_PolyOriginal on which vertices from m_PolyDegrad are projected

calculation of the nearest point curvature value using vertices of the Nearest triangle

Definition at line 471 of file msdm2.h.

Here is the call graph for this function:

◆ mesh_from_vector_representation() [1/2]

template<typename HalfedgeGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::mesh_from_vector_representation ( const HalfedgeGraph &  g,
const FEVV::PMapsContainer pmaps,
unsigned int &  dup_v_nbr,
FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &  mvr,
MeshFromVectorReprParameters< HalfedgeGraph > const &  params = MeshFromVectorReprParameters< HalfedgeGraph >() 
)

Build the mesh from the given vector representation.

Parameters
gthe output mesh
pmapsthe output property maps bag of the mesh
dup_v_nbrnumber of duplicated vertices of the mesh
mvrthe vector representation structure (input)
paramsthe named parameters
See also
the variant that use the geometry traits provided by the user.

Definition at line 863 of file mesh_from_vector_representation.hpp.

Here is the call graph for this function:

◆ mesh_from_vector_representation() [2/2]

template<typename HalfedgeGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits >
void FEVV::Filters::mesh_from_vector_representation ( HalfedgeGraph &  g,
FEVV::PMapsContainer pmaps,
unsigned int &  dup_v_nbr,
FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &  mvr,
MeshFromVectorReprParameters< HalfedgeGraph > const &  params,
const GeometryTraits &   
)

Build the mesh from the given vector representation.

Parameters
gthe output mesh
pmapsthe output property maps bag of the mesh
dup_v_nbrnumber of duplicated vertices of the mesh
mvrthe vector representation structure (input)
paramsthe named parameters
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 142 of file mesh_from_vector_representation.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh_to_vector_representation() [1/2]

template<typename FaceListGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits = FEVV::Geometry_traits< FaceListGraph >>
void FEVV::Filters::mesh_to_vector_representation ( const FaceListGraph &  g,
const FEVV::PMapsContainer pmaps,
FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &  mvr 
)

Build the vector representation of the mesh.

Parameters
gmesh
pmapsproperty maps bag of the mesh
mvrthe vector representation structure to fill (output)
See also
the variant that use the geometry traits provided by the user.

Definition at line 293 of file mesh_to_vector_representation.hpp.

Here is the call graph for this function:

◆ mesh_to_vector_representation() [2/2]

template<typename FaceListGraph , typename coordP_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename GeometryTraits >
void FEVV::Filters::mesh_to_vector_representation ( const FaceListGraph &  g,
const FEVV::PMapsContainer pmaps,
FEVV::Types::MVR< coordP_type, coordN_type, coordT_type, coordC_type, index_type > &  mvr,
const GeometryTraits &   
)

Build the vector representation of the mesh.

Parameters
gmesh
pmapsproperty maps bag of the mesh
mvrthe vector representation structure to fill (output)
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 44 of file mesh_to_vector_representation.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize_vector_map()

template<typename Iterator , typename PropertyMap , typename GeometryTraits >
void FEVV::Filters::normalize_vector_map ( const Iterator &  begin,
const Iterator &  end,
PropertyMap &  prop_map,
const GeometryTraits &  gt 
)

Normalize each vector of a property map, one by one. Generic implementation.

Parameters
beginBegin iterator of the key of the property map
endEnd iterator of the key of the property map
prop_mapProperty map containing vectors

Definition at line 32 of file normalize_vector_map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize_vector_map_edges()

template<typename HalfedgeGraph , typename PropertyMap >
void FEVV::Filters::normalize_vector_map_edges ( const HalfedgeGraph &  g,
PropertyMap &  prop_map 
)

Normalize each vector of the edge property map.

Parameters
gMesh with the property map
prop_mapProperty map of vectors

Definition at line 95 of file normalize_vector_map.h.

Here is the call graph for this function:

◆ normalize_vector_map_faces()

template<typename HalfedgeGraph , typename PropertyMap >
void FEVV::Filters::normalize_vector_map_faces ( const HalfedgeGraph &  g,
PropertyMap &  prop_map 
)

Normalize each vector of the face property map.

Parameters
gMesh with the property map
prop_mapProperty map of vectors

Definition at line 75 of file normalize_vector_map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize_vector_map_halfedges()

template<typename HalfedgeGraph , typename PropertyMap >
void FEVV::Filters::normalize_vector_map_halfedges ( const HalfedgeGraph &  g,
PropertyMap &  prop_map 
)

Normalize each vector of the halfedge property map.

Parameters
gMesh with the property map
prop_mapProperty map of vectors

Definition at line 115 of file normalize_vector_map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize_vector_map_vertices()

template<typename HalfedgeGraph , typename PropertyMap >
void FEVV::Filters::normalize_vector_map_vertices ( const HalfedgeGraph &  g,
PropertyMap &  prop_map 
)

Normalize each vector of the vertex property map.

Parameters
gMesh with the property map
prop_mapProperty map of vectors

Definition at line 55 of file normalize_vector_map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ point_cloud_curvature() [1/2]

template<typename PointCloud , typename PointMap , typename VertexCurvatureMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void FEVV::Filters::point_cloud_curvature ( const PointCloud &  pc,
const PointMap &  pm,
unsigned int  k,
double  radius,
VertexCurvatureMap &  v_curvm,
VertexColorMap &  v_cm 
)

Compute the curvature for each point of the point cloud. Helper function to simplify the call to the filter.

Parameters
pcthe point cloud
pmthe point map of the point cloud
knumber of nearest neighbors
v_curvma vertex property map to store the curvature value (double) of each vertex
v_cma vertex color map to store the curvature as a color

Definition at line 276 of file point_cloud_curvature.hpp.

Here is the call graph for this function:

◆ point_cloud_curvature() [2/2]

template<typename PointCloud , typename PointMap , typename VertexCurvatureMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< PointCloud >>
void FEVV::Filters::point_cloud_curvature ( const PointCloud &  pc,
const PointMap &  pm,
unsigned int  k,
double  radius,
VertexCurvatureMap &  v_curvm,
VertexColorMap &  v_cm,
const GeometryTraits &  gt 
)

Compute the curvature for each point of the point cloud using the nearest neighbors.

Parameters
pcthe point cloud
pmthe point map of the point cloud
knumber of nearest neighbors to use for a kNN search ; if k = 0, a radius search is done
radiusradius to use for the radius search ; ignored if k != 0
v_curvma vertex property map to store the curvature value (double) of each vertex
v_cma vertex color map to store the curvature as a color
gtthe geometry traits

Definition at line 212 of file point_cloud_curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ preprocess_mesh()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::preprocess_mesh ( HalfedgeGraph &  g,
PointMap &  pm,
FEVV::Filters::Uniform_quantization< HalfedgeGraph, PointMap > &  pq,
bool  allow_duplicates = false 
)

Isolated vertices and isolated edges are removed, then vertex positions are quantized, and eventually, vertex duplicates are moved until there is no more vertex position duplicate. This function implements line 1 of Algorithm 1.

Parameters
[in,out]gHalfedge graph that is processed.
[in,out]pmPointmap associated with g. The input positions are not quantized, while the ouput positions are.
[in,out]pqThe Uniform_quantization object to apply a XYZ uniform quantization to points in pm.
[in]allow_duplicatesThe boolean set to false to move vertex duplicates until there is no more vertex position duplicate.

Definition at line 59 of file progressive_compression_filter.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ principal_curvature_per_vert()

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void FEVV::Filters::principal_curvature_per_vert ( const HalfedgeGraph &  g,
const PointMap &  pm,
const FaceNormalMap &  f_nm,
VertexDescriptor  vd,
double  pp_matrix_sum[3][3],
const GeometryTraits &  gt 
)

Definition at line 91 of file curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ principal_curvature_per_vert_cmdm()

template<typename HalfedgeGraph , typename PointMap , typename FaceNormalMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename GraphTraits = boost::graph_traits< HalfedgeGraph >, typename VertexDescriptor = typename GraphTraits::vertex_descriptor>
void FEVV::Filters::principal_curvature_per_vert_cmdm ( const HalfedgeGraph &  g,
const PointMap &  pm,
const FaceNormalMap &  f_nm,
VertexDescriptor  vd,
double  pp_matrix_sum[3][3],
const GeometryTraits &  gt 
)

Definition at line 92 of file curvature_cmdm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_face_normals()

template<typename HalfedgeGraph , typename NormalMap >
void FEVV::Filters::print_face_normals ( const HalfedgeGraph &  g,
NormalMap  nm 
)

Print all faces normals.

Parameters
gmesh
nmnormal map of the mesh

Definition at line 28 of file print_face_normals.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_points()

template<typename HalfedgeGraph , typename PointMap >
void FEVV::Filters::print_points ( const HalfedgeGraph &  g,
PointMap  pm 
)

Print all vertices coordinates.

Parameters
gmesh
pmpoint map of the mesh

Definition at line 28 of file print_points.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_CMDM_multires() [1/2]

template<typename PointMap , typename HalfedgeGraph , typename FaceNormalMap , typename VertexCMDMMap >
double FEVV::Filters::process_CMDM_multires ( const HalfedgeGraph &  m_poly_degrad,
const PointMap &  pm_degrad,
const FaceNormalMap &  fnm_degrad,
FEVV::PMapsContainer pmaps_degrad,
const HalfedgeGraph &  m_poly_original,
const PointMap &  pm_original,
const FaceNormalMap &  fnm_original,
FEVV::PMapsContainer pmaps_original,
const int  nb_level,
VertexCMDMMap &  cmdm_pmap,
const double  maxdim,
double &  CMDM_value 
)

Definition at line 484 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_CMDM_multires() [2/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename PointMap , typename FaceNormalMap , typename VertexCMDMMap >
double FEVV::Filters::process_CMDM_multires ( const HalfedgeGraph &  m_poly_degrad,
const PointMap &  pm_degrad,
const FaceNormalMap &  fnm_degrad,
FEVV::PMapsContainer pmaps_degrad,
const HalfedgeGraph &  m_poly_original,
const PointMap &  pm_original,
const FaceNormalMap &  fnm_original,
FEVV::PMapsContainer pmaps_original,
const int  nb_level,
VertexCMDMMap &  cmdm_pmap,
double &  CMDM_value 
)

Computes the multiscale CMDM metric.

Parameters
m_PolyDegradThe first Polyhedron.
m_PolyOriginalThe second Polyhedron.
NbLevelNumber of scales used
maxdimThe max dimension of the Bounding Box Length.
[out]CMDMValueThe computed value of the CMDM metric

Definition at line 1211 of file cmdm.h.

Here is the call graph for this function:

◆ process_cmdm_per_vertex()

template<typename VertexIterator , typename HalfedgeGraph , typename TagMap , typename CurvatureVertexMap , typename CMDMCurvatureMatchMap , typename VertexColorMap >
void FEVV::Filters::process_cmdm_per_vertex ( const HalfedgeGraph &  m_degr,
CGALPoint tab_pm_degr,
const TagMap &  tags_pmap,
CGALPoint tab_nearest_pmap,
const CurvatureVertexMap &  curv_pmap_degr,
const VertexColorMap &  col_pmap_degr,
const CMDMCurvatureMatchMap &  curvmatch_pmap,
const VertexColorMap &  colmatch_pmap,
const VertexIterator &  p_vertex,
double  radius,
std::vector< CGALPoint > &  tab_point1,
std::vector< CGALPoint > &  tab_point2,
std::vector< double > &  tab_distance1,
std::vector< double > &  tab_distance2,
std::vector< std::array< double, 3 > > &  tab_color1,
std::vector< std::array< double, 3 > > &  tab_color2 
)

Computes the local neighborhoods.

Parameters
pVertexThe considered vertex
radiusradius of the neighborhood
[out]TabPoint13D points from the neighborhoodof pVertex regarding the first polyhedron
[out]TabPoint23D points from the neighborhood of pVertex regarding the second polyhedron
[out]TabDistance1Curvature values from the neighborhood of pVertex regarding the first polyhedron
[out]TabDistance2Curvature values from the neighborhood of pVertex regarding the second polyhedron
[out]TabColor1Color values (L,A,B) from the neighborhood of pVertex regarding the first polyhedron
[out]TabColor2Color values (L,A,B) from the neighborhood of pVertex regarding the second polyhedron

Definition at line 984 of file cmdm.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_msdm2_multires() [1/2]

template<typename PointMap , typename HalfedgeGraph , typename FaceNormalMap , typename VertexMSDM2Map , typename GeometryTraits >
double FEVV::Filters::process_msdm2_multires ( const HalfedgeGraph &  m_poly_degrad,
const PointMap &  pm_degrad,
const FaceNormalMap &  fnm_degrad,
FEVV::PMapsContainer pmaps_degrad,
const GeometryTraits &  gt_degrad,
const HalfedgeGraph &  m_poly_original,
const PointMap &  pm_original,
const FaceNormalMap &  fnm_original,
FEVV::PMapsContainer ,
const GeometryTraits &  ,
const int  nb_level,
VertexMSDM2Map &  msdm2_pmap,
const double  maxdim,
double &  msdm2_value 
)

Definition at line 274 of file msdm2.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_msdm2_multires() [2/2]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >, typename PointMap , typename FaceNormalMap , typename VertexMSDM2Map >
double FEVV::Filters::process_msdm2_multires ( const HalfedgeGraph &  m_poly_degrad,
const PointMap &  pm_degrad,
const FaceNormalMap &  fnm_degrad,
FEVV::PMapsContainer pmaps_degrad,
const HalfedgeGraph &  m_poly_original,
const PointMap &  pm_original,
const FaceNormalMap &  fnm_original,
FEVV::PMapsContainer pmaps_original,
const int  nb_level,
VertexMSDM2Map &  msdm2_pmap,
double &  msdm2_value 
)

Computes the multiscale MSDM2 metric.

Parameters
m_PolyDegradThe first Polyhedron.
m_PolyOriginalThe second Polyhedron.
NbLevelNumber of scales used
maxdimThe max dimension of the Bounding Box Length.
[out]MSDM2ValueThe computed value of the MSDM2 metric

Definition at line 742 of file msdm2.h.

Here is the call graph for this function:

◆ process_msdm2_per_vertex()

template<typename VertexIterator , typename HalfedgeGraph , typename PointMap , typename TagMap , typename CurvatureVertexMap , typename MSDM2NearestMap , typename MSMD2CurvatureMatchMap , typename GeometryTraits >
void FEVV::Filters::process_msdm2_per_vertex ( const HalfedgeGraph &  m_degr,
const PointMap &  pm_degr,
const TagMap &  tags_pmap,
const CurvatureVertexMap &  curv_pmap,
const MSDM2NearestMap &  nearest_pmap,
const MSMD2CurvatureMatchMap &  curvmatch_pmap,
const GeometryTraits &  ,
const HalfedgeGraph &  ,
const PointMap &  ,
const VertexIterator &  p_vertex,
double  radius,
std::vector< double > &  tab_distance1,
std::vector< double > &  tab_distance2,
std::vector< CGALPoint > &  tab_point1,
std::vector< CGALPoint > &  tab_point2 
)

Computes the local neighborhoods.

Parameters
pVertexThe considered vertex
radiusradius of the neighborhood
[out]TabDistance1Curvature values from the neighborhood of pVertex regarding the first polyhedron
[out]TabDistance2Curvature values from the neighborhood of pVertex regarding the second polyhedron
[out]TabPoint13D points from the neighborhoodof pVertex regarding the first polyhedron
[out]TabPoint23D points from the neighborhood of pVertex regarding the second polyhedron

Definition at line 581 of file msdm2.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ progressive_compression_filter() [1/3]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename EdgeColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::progressive_compression_filter ( HalfedgeGraph &  g,
PointMap &  pm,
FEVV::Filters::Uniform_quantization< HalfedgeGraph, PointMap > &  pq,
VertexColorMap &  v_cm,
EdgeColorMap &  e_cm,
const GeometryTraits &  gt,
FEVV::Filters::Error_metric< HalfedgeGraph, PointMap > *  EM,
const FEVV::Filters::Kept_position< HalfedgeGraph, PointMap > *  KP,
FEVV::Filters::Predictor< HalfedgeGraph, PointMap > *  predict,
int  nb_q_bits,
int  nb_max_batches,
int  nb_min_vertices,
FEVV::Filters::BATCH_CONDITION  batch_condition,
draco::EncoderBuffer &  buffer,
const std::string &  measure_path,
bool  preprocess = true,
bool  dequantiz = false,
bool  save_preprocess = false,
const std::string &  output_file_path_save_preprocess = "",
bool  allow_duplicates = false 
)

Takes a mesh g, applies batches of simplification until either the number of max batches or the minimum number of vertices is reached. After that, it encodes the coarse mesh and the refinement data into a buffer. This function implements Algorithm 1 (Progressive encoder).

Parameters
[in,out]gHalfedge graph to encode.
[in,out]pmPointmap associated with g (vertex positions).
[in,out]pqThe Uniform_quantization object to apply a XYZ uniform quantization to points in pm.
[out]v_cmEmpty vertex color map associated with g, used to debug topological issues during the encoding.
[out]e_cmEmpty edge color map associated with g, used to debug topological issues during the encoding.
[in]gtThe geometry trait object. Needed to encode the base mesh.
[in,out]EMThe metric type, mutable because it calls non const methods.
[in]KPThe geometric position type.
[in,out]predictThe geometric predictor, mutable because it calls non const methods.
[out]bufferOutput encoded draco buffer.
[in]measure_pathThe measure path to save information such as distortion.
[in]nb_max_batchesThe maximum number of simplification batch to apply.
[in]nb_min_verticesThe minimum number of vertices to reach in the base mesh. The obtained coarse mesh will have a number of vertices less or equal to nb_min_vertices, because the condition is checked after a simplification batch has been applied. Note that the nb_max_batches may stop the decimation before the condition on nb_min_vertices is satisfied. Therefore, to make sure the the condition on nb_min_vertices is satisfied, one should set a sufficiently high nb_max_batches.
[in]batch_conditionThe batch stopping criterion for its edge collapses.
[in]preprocessA boolean set to true to apply preprocesses.
[in]dequantizA boolean set to true to dequantize coordinates just after writting the compressed mesh into a file.
[in]save_preprocessA boolean set to true to save the preprocessed mesh (usefull for unit tests). Note that when preprocess is false the preprocessed mesh and the input mesh are the same.
[in]output_file_path_save_preprocessA path to save the preprocessed mesh.
Parameters
pmMesh to encode
pqVertex positions property map
e_cmVertex colors property map (debug)
gtEdge colors property map (debug)
EMGeometry trait object
KPLocal metric type
predictGeometric position type
nb_q_bitsGeometric predictor
nb_max_batchesNumber of quantization bits
bufferbatch stopping criterion for its edge collapses
measure_pathOutput encoded buffer
dequantiztrue to remove isolated vertices, isolated edges and vertex duplicates (several compression steps cannot handle these configurations)
save_preprocesstrue to dequantize coordinates just after writting the compressed mesh into a file mainly for display purpose

Definition at line 126 of file progressive_compression_filter.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ progressive_compression_filter() [2/3]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename EdgeColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::progressive_compression_filter ( HalfedgeGraph &  g,
PointMap &  pm,
VertexColorMap &  v_cm,
EdgeColorMap &  e_cm,
const FEVV::Filters::Parameters params,
const std::string &  output_path,
std::string &  binary_path,
int  nb_max_batches,
int  nb_min_vertices,
FEVV::Filters::BATCH_CONDITION  batch_condition,
bool  preprocess = true,
bool  dequantiz = false,
bool  save_preprocess = false,
const std::string &  output_file_path_save_preprocess = "" 
)

Takes a mesh g, applies batches of simplification until either the number of max batches or the minimum number of vertices is reached. After that, it encodes the coarse mesh and the refinement data to a binary file. The geometry trait object is set automatically (syntactic sugar).

Parameters
[in,out]gHalfedge graph to encode.
[in,out]pmPointmap associated with g (vertex positions).
[out]v_cmEmpty vertex color map associated with g, used to debug topological issues during the encoding.
[out]e_cmEmpty edge color map associated with g, used to debug topological issues during the encoding.
[in]paramsThe progressive compression parameters.
[in]output_pathThe main path to set the measure_path and the binary_path (only when set to "" for the latter).
[in,out]binary_pathThe path to write the compressed mesh file. If not set by the user (=""), then binary_path is set to output_path+predictor+metric+keptposition+quantization.bin
[in]nb_max_batchesThe maximum number of simplification batch to apply.
[in]nb_min_verticesThe minimum number of vertices to reach in the base mesh. The obtained coarse mesh will have a number of vertices less or equal to nb_min_vertices, because the condition is checked after a simplification batch has been applied. Note that the nb_max_batches may stop the decimation before the condition on nb_min_vertices is satisfied. Therefore, to make sure the the condition on nb_min_vertices is satisfied, one should set a sufficiently high nb_max_batches.
[in]batch_conditionThe batch stopping criterion for its edge collapses.
[in]preprocessA boolean set to true to apply preprocesses.
[in]dequantizA boolean set to true to dequantize coordinates just after writting the compressed mesh into a file.
[in]save_preprocessA boolean set to true to save the preprocessed mesh (usefull for unit tests). Note that when preprocess is false the preprocessed mesh and the input mesh are the same.
[in]output_file_path_save_preprocessA path to save the preprocessed mesh.
Parameters
pminput mesh
v_cmits vertex position map
e_cmits vertex color map (debug)
paramsits edge color map (debug)
output_pathinput progressive compression param
preprocessbatch stopping criterion for its edge collapses

Definition at line 639 of file progressive_compression_filter.hpp.

Here is the call graph for this function:

◆ progressive_compression_filter() [3/3]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename EdgeColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::progressive_compression_filter ( HalfedgeGraph &  g,
PointMap &  pm,
VertexColorMap &  v_cm,
EdgeColorMap &  e_cm,
const GeometryTraits &  gt,
const FEVV::Filters::Parameters params,
int  nb_max_batches,
int  nb_min_vertices,
FEVV::Filters::BATCH_CONDITION  batch_condition,
const std::string &  output_path,
std::string &  binary_path,
bool  preprocess = true,
bool  dequantiz = false,
bool  save_preprocess = false,
const std::string &  output_file_path_save_preprocess = "" 
)

Takes a mesh g, applies batches of simplification until either the number of max batches or the minimum number of vertices is reached. After that, it encodes the coarse mesh and the refinement data to a binary file.

Parameters
[in,out]gHalfedge graph to encode.
[in,out]pmPointmap associated with g (vertex positions).
[out]v_cmEmpty vertex color map associated with g, used to debug topological issues during the encoding.
[out]e_cmEmpty edge color map associated with g, used to debug topological issues during the encoding.
[in]gtThe geometry trait object. Needed to encode the base mesh.
[in]paramsThe progressive compression parameters (metric type, position type, prediction type, nb_q_bits, allow_duplicates).
[in]nb_max_batchesThe maximum number of simplification batch to apply.
[in]nb_min_verticesThe minimum number of vertices to reach in the base mesh. The obtained coarse mesh will have a number of vertices less or equal to nb_min_vertices, because the condition is checked after a simplification batch has been applied. Note that the nb_max_batches may stop the decimation before the condition on nb_min_vertices is satisfied. Therefore, to make sure the the condition on nb_min_vertices is satisfied, one should set a sufficiently high nb_max_batches.
[in]batch_conditionThe batch stopping criterion for its edge collapses.
[in]output_pathThe main path to set the measure_path and the binary_path (only when set to "" for the latter).
[in,out]binary_pathThe path to write the compressed mesh file. If not set by the user (=""), then binary_path is set to output_path+predictor+metric+keptposition+quantization.bin
[in]preprocessA boolean set to true to apply preprocesses.
[in]dequantizA boolean set to true to dequantize coordinates just after writting the compressed mesh into a file.
[in]save_preprocessA boolean set to true to save the preprocessed mesh (usefull for unit tests). Note that when preprocess is false the preprocessed mesh and the input mesh are the same.
[in]output_file_path_save_preprocessA path to save the preprocessed mesh.
Parameters
pmMesh to encode
v_cmVertex positions property map
e_cmVertex colors property map (debug)
gtEdge colors property map (debug)
paramsGeometry trait object
nb_max_batchesProgressive compression parameters
output_pathbatch stopping criterion for its edge collapses
binary_pathneeded by paths automatically set (e.g. measure_path, binary_path when set to "", etc.)
preprocessIf the binary path is not set by the user, it will automatically set the path to output_path+predictor+metric+keptposition+quantization.bin
dequantiztrue to remove isolated vertices, isolated edges and vertex duplicates (several compression steps cannot handle these configurations)
save_preprocesstrue to dequantize coordinates just after writting the compressed mesh into a file mainly for display purpose

Definition at line 386 of file progressive_compression_filter.hpp.

Here is the call graph for this function:

◆ progressive_decompression_filter() [1/3]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits >
void FEVV::Filters::progressive_decompression_filter ( HalfedgeGraph &  g,
PointMap &  pm,
VertexColorMap &  v_cm,
const GeometryTraits &  ,
draco::DecoderBuffer &  buffer,
bool  dequantize = true,
unsigned int  nb_max_batches = 10000 
)

Takes a buffer as an input, will decode the compression settings, the coarse mesh and refine the mesh until the end of buffer is reached. This function implements the Algorithm 2 (Progressive decoder).

Parameters
[out]gEmpty halfedge graph that is used to reconstruct the decoded mesh topology.
[out]pmEmpty pointmap associated with g that is used to reconstruct the decoded mesh geometry (vertex positions).
[out]v_cmEmpty vertex color map associated with g, used to debug topological issues during the decoding.
[in]gtThe geometry trait object. Used to automatically find the GeometryTraits type.
[in,out]bufferThe draco buffer to decode. Not a const param because of call to non-const draco methods such as Decode.
[in]dequantizeTrue to dequantize the vertex positions at the end of the decompression, else vertex positions remain quantized, used to test (without dequantization).
[in]nb_max_batchesA positive integer value to stop the progressive decompression after having decompressed at maximum nb_max_batches batches.

Definition at line 67 of file progressive_decompression_filter.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ progressive_decompression_filter() [2/3]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits >
void FEVV::Filters::progressive_decompression_filter ( HalfedgeGraph &  g,
PointMap &  pm,
VertexColorMap &  v_cm,
const GeometryTraits &  gt,
const std::string &  input_file_path,
bool  dequantize = true,
unsigned int  nb_max_batches = 10000 
)

Takes a binary file as an input, will decode the compression
settings, the coarse mesh and refine the mesh until the end of file is reached.

Parameters
[out]gEmpty halfedge graph that is used to reconstruct the decoded mesh topology.
[out]pmEmpty pointmap associated with g that is used to reconstruct the decoded mesh geometry (vertex positions).
[out]v_cmEmpty vertex color map associated with g, used to debug topological issues during the decoding.
[in]gtThe geometry trait object. Used to automatically find the GeometryTraits type.
[in]input_file_pathThe binary file full name to read and decode.
[in]dequantizeTrue to dequantize the vertex positions at the end of the decompression, else vertex positions remain quantized, used to test (without dequantization).
[in]nb_max_batchesA positive integer value to stop the progressive decompression after having decompressed at maximum nb_max_batches batches.

Definition at line 202 of file progressive_decompression_filter.hpp.

Here is the call graph for this function:

◆ progressive_decompression_filter() [3/3]

template<typename HalfedgeGraph , typename PointMap , typename VertexColorMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::progressive_decompression_filter ( HalfedgeGraph &  g,
PointMap &  pm,
VertexColorMap &  v_cm,
const std::string &  input_file_path,
bool  dequantize = true,
unsigned int  nb_max_batches = 10000 
)

Takes a binary file as an input, will decode the compression settings, the coarse mesh and refine the mesh until the end of file is reached. The geometry trait object is set automatically (syntactic sugar).

Parameters
[out]gEmpty halfedge graph that is used to reconstruct the decoded mesh topology.
[out]pmEmpty pointmap associated with g that is used to reconstruct the decoded mesh geometry (vertex positions).
[out]v_cmEmpty vertex color map associated with g, used to debug topological issues during the decoding.
[in]input_file_pathThe binary file full name to read and decode.
[in]dequantizeTrue to dequantize the vertex positions at the end of the decompression, else vertex positions remain quantized, used to test (without dequantization).
[in]nb_max_batchesA positive integer value to stop the progressive decompression after having decompressed at maximum nb_max_batches batches.

Definition at line 263 of file progressive_decompression_filter.hpp.

Here is the call graph for this function:

◆ read_mesh() [1/4]

void FEVV::Filters::read_mesh ( const std::string &  filename,
FEVV::CGALPointSet g,
PMapsContainer pmaps,
bool  = false 
)
inline

Load mesh from file.

Parameters
filenamename of the input mesh file
gmesh object to store the mesh being read
pmapsproperty maps bag to store the properties of the mesh being read
See also
the variant that use the geometry traits provided by the user.

Definition at line 110 of file cgal_point_set_reader.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_mesh() [2/4]

void FEVV::Filters::read_mesh ( const std::string &  filename,
FEVV::PCLPointCloud g,
PMapsContainer pmaps,
bool  = false 
)
inline

Load mesh from file.

Parameters
filenamename of the input mesh file
gmesh object to store the mesh being read
pmapsproperty maps bag to store the properties of the mesh being read
See also
the variant that use the geometry traits provided by the user.

Definition at line 196 of file pcl_point_cloud_reader.hpp.

Here is the call graph for this function:

◆ read_mesh() [3/4]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::read_mesh ( const std::string &  filename,
HalfedgeGraph &  g,
PMapsContainer pmaps,
bool  only_pts = false 
)

Load mesh from file.

Parameters
filenamename of the input mesh file
gmesh object to store the mesh being read
pmapsproperty maps bag to store the properties of the mesh being read
See also
the variant that use the geometry traits provided by the user.

Definition at line 279 of file generic_reader.hpp.

◆ read_mesh() [4/4]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::read_mesh ( const std::string &  filename,
HalfedgeGraph &  g,
PMapsContainer pmaps,
const GeometryTraits &  gt,
bool  only_pts 
)

Load mesh from file.

Parameters
filenamename of the input mesh file
gmesh object to store the mesh being read
pmapsproperty maps bag to store the properties of the mesh being read
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 73 of file generic_reader.hpp.

Here is the call graph for this function:

◆ reposition_vertices() [1/2]

template<typename PropertyGraph , typename PointMap , typename NewPointMap , typename GeometryTraits = FEVV::Geometry_traits< PropertyGraph >>
void FEVV::Filters::reposition_vertices ( const PropertyGraph &  g,
PointMap  pm,
const NewPointMap &  smoothed_pm 
)

Definition at line 84 of file reposition_vertices.hpp.

◆ reposition_vertices() [2/2]

template<typename PropertyGraph , typename PointMap , typename NewPointMap , typename GeometryTraits = FEVV::Geometry_traits< PropertyGraph >>
void FEVV::Filters::reposition_vertices ( const PropertyGraph &  g,
PointMap  pm,
const NewPointMap &  smoothed_pm,
const GeometryTraits &   
)

Apply new vertex positions to vertex position property map.

Template Parameters
PropertyGrapha Mesh type that provides a Model of the PropertyGraph Concept through a boost::graph_traits<> specialization.
PointMapA modifiable point map to manage vertex positions.
NewPointMapA modifiable point map to manage vertex' position proposals.
GeometryTraitsThe geometric kernel when available. This is defaulted to FEVV::Geometry_traits<PropertyGraph>.
Parameters
gThe PropertyGraph instance from which the vertices will be taken.
pmThe point map which associate a vertex descriptor with a vertex position.
smoothed_pmThe point map used to replace the vertex positions in pm.
gtThe geometry trait object.

Definition at line 44 of file reposition_vertices.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve_similar_edges()

template<typename MutableFaceIncidentGraph >
static void FEVV::Filters::resolve_similar_edges ( MutableFaceIncidentGraph &  g)
static

Remove/resolve similar edges for the given mesh g.

Template Parameters
MutableFaceIncidentGrapha Mesh type that provides a Model of the MutableFaceIncidentGraph Concept through a boost::graph_traits<> specialization.
Parameters
gThe MutableFaceIncidentGraph instance.

Definition at line 29 of file resolve_similar_edges.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve_similar_faces()

template<typename MutableFaceIncidentGraph >
static void FEVV::Filters::resolve_similar_faces ( MutableFaceIncidentGraph &  g,
bool  take_into_account_face_rientation = false 
)
static

Remove/resolve similar faces for the given mesh g.

Template Parameters
MutableFaceIncidentGrapha Mesh type that provides a Model of the MutableFaceIncidentGraph Concept through a boost::graph_traits<> specialization.
Parameters
gThe MutableFaceIncidentGraph instance.
take_into_account_face_rientationA boolean to tell if the similar faces must have the same orientation.

Definition at line 31 of file resolve_similar_faces.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sphere_clip_vector_cmdm()

template<typename Point3d , typename Vector >
bool FEVV::Filters::sphere_clip_vector_cmdm ( Point3d o,
double  r,
const Point3d p,
Vector v 
)

Definition at line 50 of file cmdm.h.

Here is the caller graph for this function:

◆ sphere_clip_vector_msdm2()

template<typename Point3d , typename Vector >
bool FEVV::Filters::sphere_clip_vector_msdm2 ( Point3d o,
double  r,
const Point3d p,
Vector v 
)

Definition at line 47 of file msdm2.h.

Here is the caller graph for this function:

◆ translate() [1/2]

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::translate ( const HalfedgeGraph &  g,
PointMap &  pm,
typename GeometryTraits::Scalar  offset_x,
typename GeometryTraits::Scalar  offset_y,
typename GeometryTraits::Scalar  offset_z 
)

Translate a mesh.

Parameters
ginput mesh
pmoutput point map
offsetXx translation offset
offsetYy translation offset
offsetZz translation offset
See also
the variant that use the geometry traits provided by the user.

Definition at line 77 of file translation.hpp.

◆ translate() [2/2]

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::translate ( const HalfedgeGraph &  g,
PointMap &  pm,
typename GeometryTraits::Scalar  offset_x,
typename GeometryTraits::Scalar  offset_y,
typename GeometryTraits::Scalar  offset_z,
const GeometryTraits &  gt 
)

Translate a mesh.

Parameters
ginput mesh
pmoutput point map
offsetXx translation offset
offsetYy translation offset
offsetZz translation offset
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 38 of file translation.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triangle_area()

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double FEVV::Filters::triangle_area ( const HalfedgeGraph &  g,
const PointMap &  pm,
typename boost::graph_traits< HalfedgeGraph >::face_descriptor  fd,
const GeometryTraits &  gt 
)

Definition at line 63 of file curvature.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triangle_area_cmdm()

template<typename HalfedgeGraph , typename PointMap , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
double FEVV::Filters::triangle_area_cmdm ( const HalfedgeGraph &  g,
const PointMap &  pm,
typename boost::graph_traits< HalfedgeGraph >::face_descriptor  fd,
const GeometryTraits &  gt 
)

Definition at line 63 of file curvature_cmdm.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_mesh() [1/4]

void FEVV::Filters::write_mesh ( const std::string &  filename,
FEVV::CGALPointSet g,
PMapsContainer pmaps 
)
inline

Write mesh to file.

Parameters
filenamename of the output mesh file
gmesh to write to file
pmapsproperty maps bag of the mesh

Definition at line 42 of file cgal_point_set_writer.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_mesh() [2/4]

void FEVV::Filters::write_mesh ( const std::string &  filename,
FEVV::PCLPointCloud g,
PMapsContainer  
)
inline

Write mesh to file.

Parameters
filenamename of the output mesh file
gmesh to write to file
pmapsproperty maps bag of the mesh

Definition at line 39 of file pcl_point_cloud_writer.hpp.

Here is the call graph for this function:

◆ write_mesh() [3/4]

template<typename HalfedgeGraph , typename GeometryTraits = FEVV::Geometry_traits< HalfedgeGraph >>
void FEVV::Filters::write_mesh ( const std::string &  filename,
HalfedgeGraph &  g,
PMapsContainer pmaps 
)

Write mesh to file.

Parameters
filenamename of the output mesh file
gmesh to write to file
pmapsproperty maps bag of the mesh
See also
the variant that use the geometry traits provided by the user.

Definition at line 174 of file generic_writer.hpp.

◆ write_mesh() [4/4]

template<typename HalfedgeGraph , typename GeometryTraits >
void FEVV::Filters::write_mesh ( const std::string &  filename,
HalfedgeGraph &  g,
PMapsContainer pmaps,
const GeometryTraits &  gt 
)

Write mesh to file.

Parameters
filenamename of the output mesh file
gmesh to write to file
pmapsproperty maps bag of the mesh
gtthe geometry traits to use
See also
the simplified variant that use the default geometry traits of the mesh.

Definition at line 48 of file generic_writer.hpp.

Here is the call graph for this function: