50 #ifndef OPENMESH_TRIMESH_HH
51 #define OPENMESH_TRIMESH_HH
57 #include <OpenMesh/Core/System/config.h>
58 #include <OpenMesh/Core/Mesh/PolyMeshT.hh>
87 template <
class Kernel>
99 enum { IsPolyMesh = 0 };
101 enum { IsTriMesh = 1 };
125 typedef typename PolyMesh::EdgeHandle
EdgeHandle;
126 typedef typename PolyMesh::FaceHandle
FaceHandle;
131 typedef typename PolyMesh::VertexIter VertexIter;
132 typedef typename PolyMesh::ConstVertexIter ConstVertexIter;
133 typedef typename PolyMesh::EdgeIter EdgeIter;
134 typedef typename PolyMesh::ConstEdgeIter ConstEdgeIter;
135 typedef typename PolyMesh::FaceIter FaceIter;
136 typedef typename PolyMesh::ConstFaceIter ConstFaceIter;
207 VertexHandle _vl, VertexHandle _vr)
208 {
return PolyMesh::vertex_split(add_vertex(_v0_point), _v1, _vl, _vr); }
247 VertexHandle _vl, VertexHandle _vr)
248 {
return PolyMesh::vertex_split(_v0, _v1, _vl, _vr); }
259 inline VertexHandle
split(EdgeHandle _eh,
const Point& _p)
262 const VertexHandle vh = this->add_vertex(_p); Kernel::split(_eh, vh);
return vh;
273 inline VertexHandle
split_copy(EdgeHandle _eh,
const Point& _p)
276 const VertexHandle vh = this->add_vertex(_p); Kernel::split_copy(_eh, vh);
return vh;
286 inline void split(EdgeHandle _eh, VertexHandle _vh)
289 Kernel::split(_eh, _vh);
302 Kernel::split_copy(_eh, _vh);
314 inline VertexHandle
split(FaceHandle _fh,
const Point& _p)
315 {
const VertexHandle vh = this->add_vertex(_p);
PolyMesh::split(_fh, vh);
return vh; }
326 inline VertexHandle
split_copy(FaceHandle _fh,
const Point& _p)
327 {
const VertexHandle vh = this->add_vertex(_p); PolyMesh::split_copy(_fh, vh);
return vh; }
336 inline void split(FaceHandle _fh, VertexHandle _vh)
347 { PolyMesh::split_copy(_fh, _vh); }
363 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_TRIMESH_C)
364 #define OPENMESH_TRIMESH_TEMPLATES
365 #include "TriMeshT.cc"
368 #endif // OPENMESH_TRIMESH_HH defined
void split_copy(FaceHandle _fh, VertexHandle _vh)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition: TriMeshT.hh:346
Kernel::VertexVertexIter VertexVertexIter
Circulator.
Definition: PolyMeshT.hh:158
void split_copy(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)
Definition: TriMeshT.hh:299
Kernel::ConstVertexEdgeIter ConstVertexEdgeIter
Circulator.
Definition: PolyMeshT.hh:171
Kernel::ConstVertexOHalfedgeIter ConstVertexOHalfedgeIter
Circulator.
Definition: PolyMeshT.hh:169
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56
Handle for a halfedge entity.
Definition: Handles.hh:121
void split(FaceHandle _fh, const Point &_p)
Face split (= 1-to-n split)
Definition: PolyMeshT.hh:504
static bool is_polymesh()
Determine whether this is a PolyMeshT or TriMeshT ( This function does not check the per face vertex ...
Definition: TriMeshT.hh:102
void split(FaceHandle _fh, VertexHandle _vh)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition: TriMeshT.hh:336
Kernel::Normal Normal
Normal type.
Definition: PolyMeshT.hh:110
Kernel::Halfedge Halfedge
Halfedge type.
Definition: PolyMeshT.hh:122
Kernel::VertexOHalfedgeIter VertexOHalfedgeIter
Circulator.
Definition: PolyMeshT.hh:159
VertexHandle split_copy(EdgeHandle _eh, const Point &_p)
Edge split (= 2-to-4 split)
Definition: TriMeshT.hh:273
Kernel::FaceFaceIter FaceFaceIter
Circulator.
Definition: PolyMeshT.hh:166
Kernel::VertexFaceIter VertexFaceIter
Circulator.
Definition: PolyMeshT.hh:162
Base type for a triangle mesh.
Definition: TriMeshT.hh:88
Kernel::ConstFaceFaceIter ConstFaceFaceIter
Circulator.
Definition: PolyMeshT.hh:176
Kernel::TexCoord2D TexCoord2D
TexCoord2D type.
Definition: PolyMeshT.hh:116
Handle for a edge entity.
Definition: Handles.hh:128
VertexHandle split(EdgeHandle _eh, const Point &_p)
Edge split (= 2-to-4 split)
Definition: TriMeshT.hh:259
TriMeshT()
Default constructor.
Definition: TriMeshT.hh:164
virtual ~TriMeshT()
Destructor.
Definition: TriMeshT.hh:166
Kernel::Scalar Scalar
Scalar type.
Definition: PolyMeshT.hh:106
Kernel::ConstFaceVertexIter ConstFaceVertexIter
Circulator.
Definition: PolyMeshT.hh:173
Base type for a polygonal mesh.
Definition: PolyMeshT.hh:87
Kernel::Edge Edge
Edge type.
Definition: PolyMeshT.hh:124
Kernel::ConstFaceEdgeIter ConstFaceEdgeIter
Circulator.
Definition: PolyMeshT.hh:175
Kernel::VertexEdgeIter VertexEdgeIter
Circulator.
Definition: PolyMeshT.hh:161
Kernel::ConstVertexVertexIter ConstVertexVertexIter
Circulator.
Definition: PolyMeshT.hh:168
Normal calc_face_normal(FaceHandle _fh) const
Calculate normal vector for face _fh (specialized for TriMesh).
Definition: TriMeshT.cc:72
Kernel::Face Face
Face type.
Definition: PolyMeshT.hh:126
HalfedgeHandle vertex_split(Point _v0_point, VertexHandle _v1, VertexHandle _vl, VertexHandle _vr)
Vertex Split: inverse operation to collapse().
Definition: TriMeshT.hh:206
VertexHandle split_copy(FaceHandle _fh, const Point &_p)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition: TriMeshT.hh:326
Kernel::ConstVertexIHalfedgeIter ConstVertexIHalfedgeIter
Circulator.
Definition: PolyMeshT.hh:170
Handle for a face entity.
Definition: Handles.hh:135
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
Definition: PolyMeshT.hh:132
VertexHandle split(FaceHandle _fh, const Point &_p)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition: TriMeshT.hh:314
Kernel::Color Color
Color type.
Definition: PolyMeshT.hh:112
static bool is_trimesh()
Determine whether this is a PolyMeshT or TriMeshT ( This function does not check the per face vertex ...
Definition: TriMeshT.hh:103
HalfedgeHandle vertex_split(VertexHandle _v0, VertexHandle _v1, VertexHandle _vl, VertexHandle _vr)
Vertex Split: inverse operation to collapse().
Definition: TriMeshT.hh:246
Kernel::VertexIHalfedgeIter VertexIHalfedgeIter
Circulator.
Definition: PolyMeshT.hh:160
void split(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)
Definition: TriMeshT.hh:286
Kernel::FaceVertexIter FaceVertexIter
Circulator.
Definition: PolyMeshT.hh:163
Kernel::ConstFaceHalfedgeIter ConstFaceHalfedgeIter
Circulator.
Definition: PolyMeshT.hh:174
Kernel::TexCoord1D TexCoord1D
TexCoord1D type.
Definition: PolyMeshT.hh:114
Handle for a vertex entity.
Definition: Handles.hh:114
Kernel::FaceEdgeIter FaceEdgeIter
Circulator.
Definition: PolyMeshT.hh:165
Kernel::Vertex Vertex
Vertex type.
Definition: PolyMeshT.hh:120
Kernel::TexCoord3D TexCoord3D
TexCoord3D type.
Definition: PolyMeshT.hh:118
Kernel::ConstVertexFaceIter ConstVertexFaceIter
Circulator.
Definition: PolyMeshT.hh:172
Kernel::Point Point
Coordinate type.
Definition: PolyMeshT.hh:108
Kernel::FaceHalfedgeIter FaceHalfedgeIter
Circulator.
Definition: PolyMeshT.hh:164