OpenMesh::Decimater::ModProgMeshT< DecimaterType > Class Template Reference

#include <ModProgMeshT.hh>

Inheritance diagram for OpenMesh::Decimater::ModProgMeshT< DecimaterType >:

Inheritance graph
[legend]
Collaboration diagram for OpenMesh::Decimater::ModProgMeshT< DecimaterType >:

Collaboration graph
[legend]

Public Types

typedef std::vector< InfoInfoList
 Type of the list storing the progressive mesh info Info.

Public Member Functions

 DECIMATING_MODULE (ModProgMeshT, DecimaterType, ProgMesh)
 ModProgMeshT (DecimaterType &_dec)
 Constructor.
 ~ModProgMeshT ()
 Destructor.
const InfoListpmi () const
void postprocess_collapse (const CollapseInfo &_ci)
bool is_binary (void) const
 Returns true if criteria returns a binary value.
bool write (const std::string &_ofname)
const InfoListinfolist () const
 Reference to collected information.

Data Structures

struct  Info

Detailed Description

template<class DecimaterType>
class OpenMesh::Decimater::ModProgMeshT< DecimaterType >

Collect progressive mesh information while decimating.

The progressive mesh data is stored in an internal structure, which can be evaluated after the decimation process and (!) before calling the garbage collection of the decimated mesh.


Member Function Documentation

template<class DecimaterType>
void OpenMesh::Decimater::ModProgMeshT< DecimaterType >::postprocess_collapse ( const CollapseInfo _ci  )  [inline]

Stores collapse information in a queue.

See also:
infolist()

template<class DecimaterType>
bool OpenMesh::Decimater::ModProgMeshT< DecimaterType >::write ( const std::string &  _ofname  )  [inline]

Write progressive mesh data to a file in proprietary binary format .pm.

The methods uses the collected data to write a progressive mesh file. It's a binary format with little endian byte ordering:

  • The first 8 bytes contain the word "ProgMesh".
  • 32-bit int for the number of vertices NV in the base mesh.
  • 32-bit int for the number of faces in the base mesh.
  • 32-bit int for the number of halfedge collapses (now vertex splits)
  • Positions of vertices of the base mesh (32-bit float triplets).
    [x,y,z][x,y,z]...
  • Triplets of indices (32-bit int) for each triangle (index in the list of vertices of the base mesh defined by the positions.
    [v0,v1,v2][v0,v1,v2]...
  • For each collapse/split a detail information package made of 3 32-bit floats for the positions of vertex v0, and 3 32-bit int indices for v1, vl, and vr. The index for vl or vr might be -1, if the face on this side of the edge does not exists.

Remarks:
Write file before calling the garbage collection of the mesh.
Parameters:
_ofname Name of the file, where to write the progressive mesh
Returns:
true on success of the operation, else false.


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

Generated on Fri Jan 16 13:01:40 2009 by  doxygen 1.5.5