57#ifndef OPENMESH_TRIMESH_HH
58#define OPENMESH_TRIMESH_HH
64#include <OpenMesh/Core/System/config.h>
65#include <OpenMesh/Core/Mesh/PolyMeshT.hh>
94template <
class Kernel>
107 enum { IsPolyMesh = 0 };
108 enum { IsTriMesh = 1 };
109 static bool is_polymesh() {
return false; }
110 static bool is_trimesh() {
return true; }
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"
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:64
Kernel::Vertex Vertex
Vertex type.
Definition PolyMeshT.hh:127
Kernel::FaceEdgeIter FaceEdgeIter
Circulator.
Definition PolyMeshT.hh:172
Kernel::ConstFaceIter ConstFaceIter
Scalar type.
Definition PolyMeshT.hh:154
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
Definition PolyMeshT.hh:139
Kernel::Scalar Scalar
Scalar type.
Definition PolyMeshT.hh:113
Kernel::ConstVertexVertexIter ConstVertexVertexIter
Circulator.
Definition PolyMeshT.hh:175
Kernel::ConstFaceHalfedgeIter ConstFaceHalfedgeIter
Circulator.
Definition PolyMeshT.hh:181
Kernel::EdgeHandle EdgeHandle
Scalar type.
Definition PolyMeshT.hh:141
Kernel::VertexFaceIter VertexFaceIter
Circulator.
Definition PolyMeshT.hh:169
Kernel::ConstFaceVertexIter ConstFaceVertexIter
Circulator.
Definition PolyMeshT.hh:180
Kernel::Halfedge Halfedge
Halfedge type.
Definition PolyMeshT.hh:129
PolyMeshT()
Circulator.
Definition PolyMeshT.hh:188
Kernel::FaceIter FaceIter
Scalar type.
Definition PolyMeshT.hh:149
Kernel::Normal Normal
Normal type.
Definition PolyMeshT.hh:117
Kernel::FaceVertexIter FaceVertexIter
Circulator.
Definition PolyMeshT.hh:170
Kernel::VertexIHalfedgeIter VertexIHalfedgeIter
Circulator.
Definition PolyMeshT.hh:167
Kernel::TexCoord2D TexCoord2D
TexCoord2D type.
Definition PolyMeshT.hh:123
Kernel::ConstFaceEdgeIter ConstFaceEdgeIter
Circulator.
Definition PolyMeshT.hh:182
Kernel::TexCoord3D TexCoord3D
TexCoord3D type.
Definition PolyMeshT.hh:125
Kernel::ConstVertexFaceIter ConstVertexFaceIter
Circulator.
Definition PolyMeshT.hh:179
Kernel::VertexOHalfedgeIter VertexOHalfedgeIter
Circulator.
Definition PolyMeshT.hh:166
Kernel::VertexEdgeIter VertexEdgeIter
Circulator.
Definition PolyMeshT.hh:168
Kernel::Face Face
Face type.
Definition PolyMeshT.hh:133
Kernel::ConstVertexIHalfedgeIter ConstVertexIHalfedgeIter
Circulator.
Definition PolyMeshT.hh:177
Kernel::FaceFaceIter FaceFaceIter
Circulator.
Definition PolyMeshT.hh:173
Kernel::ConstVertexEdgeIter ConstVertexEdgeIter
Circulator.
Definition PolyMeshT.hh:178
Kernel::Edge Edge
Edge type.
Definition PolyMeshT.hh:131
Kernel::FaceHandle FaceHandle
Scalar type.
Definition PolyMeshT.hh:142
VertexHandle add_vertex(const Point &_p)
Alias for new_vertex(const Point&).
Definition PolyMeshT.hh:236
Kernel::HalfedgeHandle HalfedgeHandle
Scalar type.
Definition PolyMeshT.hh:140
Kernel::EdgeIter EdgeIter
Scalar type.
Definition PolyMeshT.hh:148
Kernel::ConstEdgeIter ConstEdgeIter
Scalar type.
Definition PolyMeshT.hh:153
Kernel::ConstVertexIter ConstVertexIter
Scalar type.
Definition PolyMeshT.hh:151
Kernel::ConstVertexOHalfedgeIter ConstVertexOHalfedgeIter
Circulator.
Definition PolyMeshT.hh:176
Kernel::VertexVertexIter VertexVertexIter
Circulator.
Definition PolyMeshT.hh:165
Kernel::FaceHalfedgeIter FaceHalfedgeIter
Circulator.
Definition PolyMeshT.hh:171
Kernel::Point Point
Coordinate type.
Definition PolyMeshT.hh:115
Kernel::ConstFaceFaceIter ConstFaceFaceIter
Circulator.
Definition PolyMeshT.hh:183
void split(FaceHandle _fh, const Point &_p)
Face split (= 1-to-n split)
Definition PolyMeshT.hh:545
Kernel::Color Color
Color type.
Definition PolyMeshT.hh:119
Kernel::TexCoord1D TexCoord1D
TexCoord1D type.
Definition PolyMeshT.hh:121
Kernel::VertexIter VertexIter
Scalar type.
Definition PolyMeshT.hh:146
void split(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)
Definition TriMeshT.hh:293
TriMeshT()
Default constructor.
Definition TriMeshT.hh:171
VertexHandle split(EdgeHandle _eh, const Point &_p)
Edge split (= 2-to-4 split)
Definition TriMeshT.hh:266
void split(FaceHandle _fh, VertexHandle _vh)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition TriMeshT.hh:343
VertexHandle split(FaceHandle _fh, const Point &_p)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition TriMeshT.hh:321
Normal calc_face_normal(FaceHandle _fh) const
Calculate normal vector for face _fh (specialized for TriMesh).
Definition TriMeshT.cc:79
VertexHandle split_copy(FaceHandle _fh, const Point &_p)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition TriMeshT.hh:333
HalfedgeHandle vertex_split(Point _v0_point, VertexHandle _v1, VertexHandle _vl, VertexHandle _vr)
Vertex Split: inverse operation to collapse().
Definition TriMeshT.hh:213
VertexHandle split_copy(EdgeHandle _eh, const Point &_p)
Edge split (= 2-to-4 split)
Definition TriMeshT.hh:280
virtual ~TriMeshT()
Destructor.
Definition TriMeshT.hh:173
void split_copy(FaceHandle _fh, VertexHandle _vh)
Face split (= 1-to-3 split, calls corresponding PolyMeshT function).
Definition TriMeshT.hh:353
HalfedgeHandle vertex_split(VertexHandle _v0, VertexHandle _v1, VertexHandle _vl, VertexHandle _vr)
Vertex Split: inverse operation to collapse().
Definition TriMeshT.hh:253
void split_copy(EdgeHandle _eh, VertexHandle _vh)
Edge split (= 2-to-4 split)
Definition TriMeshT.hh:306