OpenMesh
|
Collect progressive mesh information while decimating. More...
#include <OpenMesh/Tools/Decimater/ModProgMeshT.hh>
Classes | |
struct | Info |
Struct storing progressive mesh information. More... | |
Public Types | |
typedef ModProgMeshT< MeshT > | Self |
typedef OpenMesh::Decimater::ModHandleT< Self > | Handle |
typedef OpenMesh::Decimater::ModBaseT< MeshT > | Base |
typedef Base::Mesh | Mesh |
typedef Base::CollapseInfo | CollapseInfo |
typedef std::vector< Info > | InfoList |
Type of the list storing the progressive mesh info Info. | |
Public Types inherited from OpenMesh::Decimater::ModBaseT< MeshT > | |
enum | { ILLEGAL_COLLAPSE = -1, LEGAL_COLLAPSE = 0 } |
typedef MeshT | Mesh |
typedef CollapseInfoT< MeshT > | CollapseInfo |
Public Member Functions | |
virtual const std::string & | name () const override |
Set module's name. | |
ModProgMeshT (MeshT &_mesh) | |
Constructor. | |
~ModProgMeshT () | |
Destructor. | |
const InfoList & | pmi () const |
void | postprocess_collapse (const CollapseInfo &_ci) override |
Stores collapse information in a queue. More... | |
bool | is_binary (void) const |
bool | write (const std::string &_ofname) |
Write progressive mesh data to a file in proprietary binary format .pm. More... | |
const InfoList & | infolist () const |
Reference to collected information. | |
Public Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT > | |
virtual | ~ModBaseT () |
Virtual desctructor. | |
bool | is_binary (void) const |
Returns true if criteria returns a binary value. | |
void | set_binary (bool _b) |
Set whether module is binary or not. | |
virtual void | initialize () |
Initialize module-internal stuff. | |
virtual float | collapse_priority (const CollapseInfoT< MeshT > &) |
Return collapse priority. More... | |
virtual void | preprocess_collapse (const CollapseInfoT< MeshT > &) |
Before _from_vh has been collapsed into _to_vh, this method will be called. | |
virtual void | set_error_tolerance_factor (double _factor) |
This provides a function that allows the setting of a percentage of the original contraint. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT > | |
ModBaseT (MeshT &_mesh, bool _is_binary) | |
Default constructor. More... | |
MeshT & | mesh () |
Access the mesh associated with the decimater. | |
Protected Attributes inherited from OpenMesh::Decimater::ModBaseT< MeshT > | |
double | error_tolerance_factor_ |
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.
|
inlineoverridevirtual |
Stores collapse information in a queue.
Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.
bool OpenMesh::Decimater::ModProgMeshT< MeshT >::write | ( | const std::string & | _ofname | ) |
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:
NV
in the base mesh.
[x,y,z][x,y,z]...
[v0,v1,v2][v0,v1,v2]...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._ofname | Name of the file, where to write the progressive mesh |
true
on success of the operation, else false
.