57 #ifndef OPENMESH_TRIMESH_HH
58 #define OPENMESH_TRIMESH_HH
65 #include <OpenMesh/Core/Mesh/PolyMeshT.hh>
94 template <
class Kernel>
106 enum { IsPolyMesh = 0 };
108 enum { IsTriMesh = 1 };
132 typedef typename PolyMesh::EdgeHandle
EdgeHandle;
133 typedef typename PolyMesh::FaceHandle
FaceHandle;
138 typedef typename PolyMesh::VertexIter VertexIter;
139 typedef typename PolyMesh::ConstVertexIter ConstVertexIter;
140 typedef typename PolyMesh::EdgeIter EdgeIter;
141 typedef typename PolyMesh::ConstEdgeIter ConstEdgeIter;
142 typedef typename PolyMesh::FaceIter FaceIter;
143 typedef typename PolyMesh::ConstFaceIter ConstFaceIter;
214 VertexHandle _vl, VertexHandle _vr)
215 {
return PolyMesh::vertex_split(this->
add_vertex(_v0_point), _v1, _vl, _vr); }
254 VertexHandle _vl, VertexHandle _vr)
255 {
return PolyMesh::vertex_split(_v0, _v1, _vl, _vr); }
266 inline VertexHandle
split(EdgeHandle _eh,
const Point& _p)
269 const VertexHandle vh = this->
add_vertex(_p); Kernel::split(_eh, vh);
return vh;
280 inline VertexHandle
split_copy(EdgeHandle _eh,
const Point& _p)
283 const VertexHandle vh = this->
add_vertex(_p); Kernel::split_copy(_eh, vh);
return vh;
293 inline void split(EdgeHandle _eh, VertexHandle _vh)
296 Kernel::split(_eh, _vh);
309 Kernel::split_copy(_eh, _vh);
321 inline VertexHandle
split(FaceHandle _fh,
const Point& _p)
333 inline VertexHandle
split_copy(FaceHandle _fh,
const Point& _p)
334 {
const VertexHandle vh = this->
add_vertex(_p); PolyMesh::split_copy(_fh, vh);
return vh; }
343 inline void split(FaceHandle _fh, VertexHandle _vh)
354 { PolyMesh::split_copy(_fh, _vh); }
370 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_TRIMESH_C)
371 #define OPENMESH_TRIMESH_TEMPLATES
372 #include "TriMeshT.cc"
375 #endif // OPENMESH_TRIMESH_HH defined
TriMeshT()
Default constructor.
Kernel::ConstVertexEdgeIter ConstVertexEdgeIter
Circulator.
Kernel::ConstFaceVertexIter ConstFaceVertexIter
Circulator.
Kernel::ConstVertexVertexIter ConstVertexVertexIter
Circulator.
Kernel::VertexIHalfedgeIter VertexIHalfedgeIter
Circulator.
VertexHandle split_copy(EdgeHandle _eh, const Point &_p)
Edge split (= 2-to-4 split)
Kernel::Color Color
Color type.
static bool is_trimesh()
Determine whether this is a PolyMeshT or TriMeshT ( This function does not check the per face vertex ...
Kernel::ConstVertexOHalfedgeIter ConstVertexOHalfedgeIter
Circulator.
Kernel::ConstFaceEdgeIter ConstFaceEdgeIter
Circulator.
Kernel::FaceEdgeIter FaceEdgeIter
Circulator.
Kernel::VertexVertexIter VertexVertexIter
Circulator.
Kernel::Face Face
Face type.
Kernel::Vertex Vertex
Vertex type.
Kernel::Point Point
Coordinate type.
Handle for a halfedge entity.
VertexHandle add_vertex(const Point &_p)
Alias for new_vertex(const Point&).
static bool is_polymesh()
Determine whether this is a PolyMeshT or TriMeshT ( This function does not check the per face vertex ...
void split_copy(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)
Kernel::TexCoord2D TexCoord2D
TexCoord2D type.
VertexHandle split(FaceHandle _fh, const Point &_p)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Kernel::FaceFaceIter FaceFaceIter
Circulator.
Kernel::ConstFaceHalfedgeIter ConstFaceHalfedgeIter
Circulator.
Kernel::ConstVertexIHalfedgeIter ConstVertexIHalfedgeIter
Circulator.
HalfedgeHandle vertex_split(VertexHandle _v0, VertexHandle _v1, VertexHandle _vl, VertexHandle _vr)
Vertex Split: inverse operation to collapse().
Handle for a vertex entity.
Kernel::VertexEdgeIter VertexEdgeIter
Circulator.
void split(FaceHandle _fh, VertexHandle _vh)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Kernel::Edge Edge
Edge type.
Handle for a edge entity.
void split_copy(FaceHandle _fh, VertexHandle _vh)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Kernel::VertexOHalfedgeIter VertexOHalfedgeIter
Circulator.
Kernel::TexCoord3D TexCoord3D
TexCoord3D type.
Handle for a face entity.
Kernel::Scalar Scalar
Scalar type.
Kernel::ConstVertexFaceIter ConstVertexFaceIter
Circulator.
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
VertexHandle split(EdgeHandle _eh, const Point &_p)
Edge split (= 2-to-4 split)
Kernel::TexCoord1D TexCoord1D
TexCoord1D type.
Kernel::FaceVertexIter FaceVertexIter
Circulator.
Kernel::ConstFaceFaceIter ConstFaceFaceIter
Circulator.
Normal calc_face_normal(FaceHandle _fh) const
HalfedgeHandle vertex_split(Point _v0_point, VertexHandle _v1, VertexHandle _vl, VertexHandle _vr)
Vertex Split: inverse operation to collapse().
VertexHandle split_copy(FaceHandle _fh, const Point &_p)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Kernel::FaceHalfedgeIter FaceHalfedgeIter
Circulator.
void split(FaceHandle _fh, const Point &_p)
Face split (= 1-to-n split)
Kernel::VertexFaceIter VertexFaceIter
Circulator.
Kernel::Halfedge Halfedge
Halfedge type.
virtual ~TriMeshT()
Destructor.
Kernel::Normal Normal
Normal type.
void split(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)