Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::HalfEdges Class Reference

A half edge datastructure of the mesh topology. Note: only the topology is stored, no vertex data. More...

#include <halfedges.h>

Classes

class  EdgeIter
 

Public Member Functions

 HalfEdges (Mesh::MeshInfo info, const IndexBuffer &indexBuffer)
 Construct from MeshInfo and index buffer.
 
 HalfEdges (const Mesh &mesh)
 Construct from Mesh, only triangles are considered.
 
IndexBuffer createIndexBuffer () const
 Creates a index buffer for triangles with connectivity 'None'.
 
IndexBuffer createIndexBufferWithAdjacency () const
 Creates a index buffer for triangles with connectivity 'Adjacency'.
 
EdgeIter faceToEdge (std::uint32_t faceIndex) const
 
EdgeIter vertexToEdge (std::uint32_t vertexIndex) const
 
auto faces () const
 
auto vertices () const
 

Detailed Description

A half edge datastructure of the mesh topology. Note: only the topology is stored, no vertex data.

Code ideas taken from https://github.com/yig/halfedge and http://prideout.net/blog/?p=54, both are public domain (11/12/2017).

        v2────────────────v3  edge │ vertex face  next  twin
       ╱ ╲ ◀────e5─────▲ ╱    ─────┼────────────────────────
      ╱ ▲ ╲ ╲         ╱ ╱      e0  │   v0    f1    e1    -
     ╱ ╱ ╲ ╲ ╲  f1   ╱ ╱       e1  │   v1    f1    e2    e3
    ╱ ╱   ╲ ╲e3    e4 ╱        e2  │   v2    f1    e0    -
   ╱e2    e1 ╲ ╲   ╱ ╱         e3  │   v2    f2    e4    e1
  ╱ ╱  f0   ╲ ╲ ╲ ╱ ╱          e4  │   v1    f2    e5    -
 ╱ ╱         ╲ ╲ ▼ ╱           e5  │   v3    f2    e3    -
╱ ▼────e0─────▶ ╲ ╱

v0────────────────v1


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