IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ipsdk::geom::MeshSimplification< T > Class Template Reference

Closed mesh associated to a triangulated boundary. More...

#include <MeshSimplification.h>

Classes

struct  Ref
 
struct  Triangle
 
struct  vec3f
 
struct  vector3
 
struct  Vertex
 

Public Types

typedef ipUInt64FaceData
 
typedef FaceData * FaceDataArray
 
typedef ipReal64VertexData
 
typedef VertexData * VertexDataArray
 

Public Member Functions

void simplify_mesh_inSitu (Mesh3d< T > &mesh, const ipUInt64 target_count, const ipReal64 agressiveness=7, const ipBool bVerbose=false)
 Simplify an input mesh in situ.
 
boost::shared_ptr< Mesh3d< T > > simplify_mesh (const Mesh3d< T > &mesh, const ipUInt64 target_count, const ipReal64 agressiveness=7, const ipBool bVerbose=false)
 Simplify an input mesh in situ.
 
void simplify_arrays (const ipReal32 *pVerticesArray, const ipUInt32 *pTrianglesArray, const ipUInt64 nbVertices, const ipUInt64 nbTriangles, const ipUInt64 target_count, const ipReal64 agressiveness, const ipBool bVerbose, std::vector< ipReal32 > &vVerticesArray, std::vector< ipUInt32 > &vFacesArray)
 Simplify vertices and faces arrays in situ.
 
void clear ()
 clear of all mesh data
 
Constructors and destructor
 MeshSimplification ()
 
 ~MeshSimplification ()
 

Protected Member Functions

ipReal64 min (const ipReal64 v1, const ipReal64 v2)
 Returns the minimum value between v1 and v2.
 
void simplification (const ipUInt64 target_count, const ipReal64 agressiveness=7, const ipBool bVerbose=false)
 Simplifies the data arrays during the mesh simplification.
 
const ipBool flipped (const vec3f &p, const ipUInt32 i0, const ipUInt32 i1, const Vertex &v0, const Vertex &v1, std::vector< ipUInt32 > &deleted)
 Checks if a triangle is flipped during simplification.
 
void update_triangles (const ipUInt32 i0, const Vertex &v, const std::vector< ipUInt32 > &deleted, ipUInt32 &deleted_triangles)
 Updates triangles datas.
 
void update_mesh (const ipUInt32 iteration)
 Updates the simplification datas.
 
void compact_data ()
 Reorganizes all the data after simplification method.
 
void compact_mesh (Mesh3d< T > &mesh)
 Reorganizes all the data after simplification and update the mesh data.
 
void compact_arrays (const ipReal32 *pVertexArray, const ipUInt32 *pFaceArray, std::vector< ipReal32 > &vVerticesArray, std::vector< ipUInt32 > &vFacesArray)
 Reorganizes all the data after simplification and update the vertices and faces arrays.
 
ipReal64 vertex_error (const SymmetricMatrix &q, const ipReal64 x, const ipReal64 y, const ipReal64 z)
 Calculates the error of a vertex.
 
ipReal64 calculate_error (const ipUInt32 id_v1, const ipUInt32 id_v2, vec3f &pResult)
 Calculates the error of the edge(id_v1, id_v2) and computes the best point to collapse to.
 

Protected Attributes

std::vector< Triangle_triangles
 
std::vector< Vertex_vertices
 
std::vector< Ref_refs
 
std::vector< std::vector< ipBool > > _collapses
 

Detailed Description

template<typename T>
class ipsdk::geom::MeshSimplification< T >

Closed mesh associated to a triangulated boundary.

Author
A.Eymar
Date
2023/10/03

The documentation for this class was generated from the following file: