Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision c2ea6fbae2634487a33181bb44d1508b19a4507c authored by Jan Möbius on 23 November 2022, 15:04:04 UTC, committed by Jan Möbius on 23 November 2022, 15:04:04 UTC
Merge branch 'fix_calc_normal_for_edges' into 'master'
Fix calc_normal for edges

See merge request OpenMesh/OpenMesh!325
2 parent s 3f328cd + 121ff40
  • Files
  • Changes
  • 2d0c205
  • /
  • Doc
  • /
  • decimater.docu
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:c2ea6fbae2634487a33181bb44d1508b19a4507c
directory badge
swh:1:dir:83d80ecaf3ffe2b50dfbe0365d52d7add12e01b8
content badge
swh:1:cnt:207a252998939728ef78bcf30bedee89dd8f2273

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
decimater.docu
//-----------------------------------------------------------------------------

/** \page decimater_docu Mesh Decimation Framework

  The mesh decimation framework has 3 building blocks.

  -# \ref DecimaterAlg
  -# \ref DecimaterMod
  -# \ref DecimaterHnd

\section DecimaterAlg The decimation algorithm

  The decimater (OpenMesh::Decimater::DecimaterT) provides the
  decimation algorithm, while the decimation modules provide the
  computational part. The modules compute a priority value due to some
  error metric, which is used by the decimater to feed a priority
  queue. The lower the error value, the more a potential collapse
  moves to the front of the queue. The one with the lowest error will
  always be the candidate for the next collapse.

  This implementation does a halfedge collapse, hence simply
  collapsing one vertex into another connected by a halfedge.

  \note The decimater ignores all 'locked' and 'deleted' vertices (see
  OpenMesh::Attributes::StatusBits) 

  \attention The decimater sets temporarily the status bit 'tagged' and
  clears it after usage regardless of a previous state.

\section DecimaterLock Block vertices from beeing touched by the Decimater
  You could mark vertices as locked, which should not be modified by the decimater.

  \code
    // That might be already requested
    mesh_->request_vertex_status();

    // Get an iterator over all halfedges
    Mesh::HalfedgeIter he_it, he_end=mesh_->halfedges_end();

    // If halfedge is boundary, lock the corresponding vertices
    for (he_it = mesh_->halfedges_begin(); he_it != he_end ; ++he_it)
      if (mesh_->is_boundary(*he_it)) {
         mesh_->status(_mesh->to_vertex_handle(*he_it)).set_locked(true);
         mesh_->status(_mesh->from_vertex_handle(*he_it)).set_locked(true);
      }
  \endcode

\section DecimaterMod Decimating Modules

  The vertex to be removed is determined by a decimation module, which has
  to be derived from OpenMesh::Decimater::ModBaseT. The framework
  supplies already a few decimation modules. But it's very easy to build
  your own (\ref OpenMesh::Decimater::ModBaseT).  The most important
  function of a decimation module is
  OpenMesh::Decimater::ModBaseT::collapse_priority(). It takes an
  OpenMesh::Decimater::CollapseInfoT describing a potential halfedge
  collapse, and returns a value due to some error metric. The error
  value is used by the decimater to feed a priority queue. Collapses
  with low error will be executed first, and those with large error
  later. Of course a module computing the error quadric is provided
  (OpenMesh::Decimater::ModQuadricT).

  This framework allows to use more than one decimation module with
  some restrictions. Since the error value is always normalized and
  sometimes very difficult to compare to other metrics, the framework
  allows only one non-binary module, i.e. a module computing a float
  value. Every further module must be a binary module,
  i.e. collapse_prioerity() returns
  OpenMesh::Decimater::ModBaseT::LEGAL_COLLAPSE or
  OpenMesh::Decimater::ModBaseT::ILLEGAL_COLLAPSE. In the algorithm
  the binary modules are evaluated first. If the evaluated collapse
  passes the test, then the non-binary module contributes to the
  decision step.

  In some cases the module does not contribute anything to the
  decision engine of the decimater, but instead, e.g. simply collects
  information, while the decimater does it's work. For instance the
  module OpenMesh::Decimater::ModProgMeshT collects information from
  all collapses that have been done. This information can be used to
  generate progressive meshes as described in "Progressive meshes",
  Hoppe, 1996.
    
  Provided decimation modules(Binary: B, Continuous: C, Special: X):
 
  - OpenMesh::Decimater::ModAspectRatioT (B,C)
  - OpenMesh::Decimater::ModEdgeLengthT (B,C)
  - OpenMesh::Decimater::ModHausdorffT (B)
  - OpenMesh::Decimater::ModIndependentSetsT (B)
  - OpenMesh::Decimater::ModNormalDeviationT (B,C) 
  - OpenMesh::Decimater::ModNormalFlippingT (B)
  - OpenMesh::Decimater::ModProgMeshT (X)
  - OpenMesh::Decimater::ModQuadricT (B,C)
  - OpenMesh::Decimater::ModRoundnessT (B,C)

\section DecimaterHnd Module Handles

  Similar to properties the modules are represented outside the
  decimater by module handles. Before using the decimater a
  non-binary module must be registrated with the decimater.

  See \ref DecimaterExa.
        
\section DecimaterExa Basic Setup

  The following small example show the basic steps to setup up a
  decimater:

\include decimater.cc

*/

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API