libigl v2.5.0
Loading...
Searching...
No Matches
igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi > Class Template Reference

Fake halfedge for fast and easy navigation on triangle meshes with vertex_triangle_adjacency and triangle_triangle adjacency. More...

#include <HalfEdgeIterator.h>

Public Member Functions

 HalfEdgeIterator (const Eigen::MatrixBase< DerivedF > &_F, const Eigen::MatrixBase< DerivedFF > &_FF, const Eigen::MatrixBase< DerivedFFi > &_FFi, int _fi, int _ei, bool _reverse=false)
 Init the HalfEdgeIterator by specifying Face,Edge Index and Orientation.
 
void flipF ()
 Change Face.
 
void flipE ()
 Change Edge.
 
void flipV ()
 Change Vertex.
 
bool isBorder ()
 Determine if on border.
 
bool NextFE ()
 Change to next edge skipping the border.
 
int Vi ()
 Get vertex index.
 
int Fi ()
 Get face index.
 
int Ei ()
 Get edge index.
 
bool operator== (HalfEdgeIterator &p2)
 Check if two HalfEdgeIterator are the same.
 

Detailed Description

template<typename DerivedF, typename DerivedFF, typename DerivedFFi>
class igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >

Fake halfedge for fast and easy navigation on triangle meshes with vertex_triangle_adjacency and triangle_triangle adjacency.

Note: this is different to classical Half Edge data structure. Instead, it follows cell-tuple in [Brisson, 1989] "Representing geometric structures in d dimensions: topology and order." This class can achieve local navigation similar to half edge in OpenMesh But the logic behind each atom operation is different. So this should be more properly called TriangleTupleIterator.

Each tuple contains information on (face, edge, vertex) and encoded by (face, edge \in {0,1,2}, bool reverse)

Constructor & Destructor Documentation

◆ HalfEdgeIterator()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::HalfEdgeIterator ( const Eigen::MatrixBase< DerivedF > &  _F,
const Eigen::MatrixBase< DerivedFF > &  _FF,
const Eigen::MatrixBase< DerivedFFi > &  _FFi,
int  _fi,
int  _ei,
bool  _reverse = false 
)

Init the HalfEdgeIterator by specifying Face,Edge Index and Orientation.

Parameters
[in]FF by 3 list of "faces"
[in]FFF by 3 list of triangle-triangle adjacency.
[in]FFiF by 3 list of FF inverse. For FF and FFi, refer to "triangle_triangle_adjacency.h"
[in]_fiindex of the selected face
[in]_iiindex of the selected face
[in]_reverseorientation of the selected face

Member Function Documentation

◆ flipF()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
void igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::flipF ( )

Change Face.

◆ flipE()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
void igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::flipE ( )

Change Edge.

◆ flipV()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
void igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::flipV ( )

Change Vertex.

◆ isBorder()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
bool igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::isBorder ( )

Determine if on border.

Returns
true if the current edge is on the border

◆ NextFE()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
bool igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::NextFE ( )

Change to next edge skipping the border.


/\ c | b /\ / \ | / \ / d \ | / a \ /______|/______\ v In this example, if a and d are of-border and the pos is iterating counterclockwise, this method iterate through the faces incident on vertex v, producing the sequence a, b, c, d, a, b, c, ...

Returns
true if the next edge is not on the border

◆ Vi()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
int igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::Vi ( )

Get vertex index.

Returns
vertex index

◆ Fi()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
int igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::Fi ( )

Get face index.

Returns
face index

◆ Ei()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
int igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::Ei ( )

Get edge index.

Returns
edge index

◆ operator==()

template<typename DerivedF , typename DerivedFF , typename DerivedFFi >
bool igl::HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi >::operator== ( HalfEdgeIterator< DerivedF, DerivedFF, DerivedFFi > &  p2)

Check if two HalfEdgeIterator are the same.

Returns
true if two HalfEdgeIterator are the same

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