Static Public Member Functions | Private Types
vcg::tri::PolygonSupport< TriMeshType, PolyMeshType > Class Template Reference

This class is used convert between polygonal meshes and triangular meshes. More...

#include <vcg/complex/algorithms/polygon_support.h>

List of all members.

Static Public Member Functions

static void ExtractPolygon (typename TriMeshType::FacePointer tfp, std::vector< typename TriMeshType::VertexPointer > &vs, std::vector< typename TriMeshType::FacePointer > &fs)
 Collect tris and verts of a polygonal face marked by FauxEdges.
static void ExtractPolygon (typename TriMeshType::FacePointer tfp, std::vector< typename TriMeshType::VertexPointer > &vs)
static void ImportFromPolyMesh (TriMeshType &tm, PolyMeshType &pm)
static void ImportFromTriMesh (PolyMeshType &pm, TriMeshType &tm)
 Import a polygon mesh from a triangle mesh.
static void MergeFlatFaces (TriMeshType &tm, double tolerance=0.1E-4)

Private Types

typedef PolyMeshType::FaceIterator PolyFaceIterator
typedef
PolyMeshType::VertexIterator 
PolyVertexIterator
typedef
TriMeshType::CoordType::ScalarType 
Scalar
typedef TriMeshType::FaceIterator TriFaceIterator
typedef TriMeshType::VertexIterator TriVertexIterator

Detailed Description

template<class TriMeshType, class PolyMeshType>
class vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >

This class is used convert between polygonal meshes and triangular meshes.

This class contains two members that allow to build a triangular mesh from a polygonal mesh and viceversa. In a trimesh, the generic polygons with n sides are codified represented by tagging the internal edge of the face as 'faux' with the SetF.

Definition at line 45 of file polygon_support.h.


Member Typedef Documentation

template<class TriMeshType , class PolyMeshType >
typedef PolyMeshType::FaceIterator vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::PolyFaceIterator [private]

Definition at line 47 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
typedef PolyMeshType::VertexIterator vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::PolyVertexIterator [private]

Definition at line 49 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
typedef TriMeshType::CoordType::ScalarType vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::Scalar [private]

Definition at line 50 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
typedef TriMeshType::FaceIterator vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::TriFaceIterator [private]

Definition at line 46 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
typedef TriMeshType::VertexIterator vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::TriVertexIterator [private]

Definition at line 48 of file polygon_support.h.


Member Function Documentation

template<class TriMeshType , class PolyMeshType >
static void vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::ExtractPolygon ( typename TriMeshType::FacePointer  tfp,
std::vector< typename TriMeshType::VertexPointer > &  vs,
std::vector< typename TriMeshType::FacePointer > &  fs 
) [inline, static]

Collect tris and verts of a polygonal face marked by FauxEdges.

Given a face pointer, it builds a vector with all the face and vertex pointers around the polygonal face determined by the current FAUX-EDGE markings. It assumes that the mesh is 2Manifold and has FF adjacency already computed per face visited flag cleared. NOTE: All the faces touched are marked as visited and it assumes that you do not call this function on a visited face.

Definition at line 163 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
static void vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::ExtractPolygon ( typename TriMeshType::FacePointer  tfp,
std::vector< typename TriMeshType::VertexPointer > &  vs 
) [inline, static]

Definition at line 202 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
static void vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::ImportFromPolyMesh ( TriMeshType &  tm,
PolyMeshType &  pm 
) [inline, static]

Import a trianglemesh from a polygon mesh

Definition at line 77 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
static void vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::ImportFromTriMesh ( PolyMeshType &  pm,
TriMeshType &  tm 
) [inline, static]

Import a polygon mesh from a triangle mesh.

It assumes that the mesh has the faux edges bit set for a polygonal mesh and that have the FFAdjacency already computed.

Definition at line 121 of file polygon_support.h.

template<class TriMeshType , class PolyMeshType >
static void vcg::tri::PolygonSupport< TriMeshType, PolyMeshType >::MergeFlatFaces ( TriMeshType &  tm,
double  tolerance = 0.1E-4 
) [inline, static]

Given a tri mesh (with per-face normals and FF connectivity), merges flat faces into larger polygons. The merging is done only by setting the faux bit

Definition at line 58 of file polygon_support.h.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:43:01