Developer Documentation
Loading...
Searching...
No Matches
OpenMesh::PolyMeshT< Kernel > Class Template Reference

#include <OpenMesh/Mesh/PolyMeshT.hh>

Inheritance diagram for OpenMesh::PolyMeshT< Kernel >:
OpenMesh::PolyMesh_ArrayKernelT< CustomTraitsVec2i > OpenMesh::PolyMesh_ArrayKernelT< Traits > OpenMesh::TriMeshT< Kernel > OpenMesh::TriMesh_ArrayKernelT< CustomTraits > OpenMesh::TriMesh_ArrayKernelT< CustomTraitsVec2i > OpenMesh::Kernel_OSG::TriMesh_OSGArrayKernelT< Traits > OpenMesh::TriMesh_ArrayKernelT< Traits >

Classes

struct  PointIs3DTag
 
struct  PointIsNot3DTag
 

Public Types

enum  { IsPolyMesh = 1 }
 
enum  { IsTriMesh = 0 }
 
typedef PolyMeshT< Kernel > This
 Self type. Used to specify iterators/circulators.
 
using ConnectivityTag = PolyConnectivityTag
 
Mesh Items
typedef Kernel::Scalar Scalar
 Scalar type.
 
typedef Kernel::Point Point
 Coordinate type.
 
typedef Kernel::Normal Normal
 Normal type.
 
typedef Kernel::Color Color
 Color type.
 
typedef Kernel::TexCoord1D TexCoord1D
 TexCoord1D type.
 
typedef Kernel::TexCoord2D TexCoord2D
 TexCoord2D type.
 
typedef Kernel::TexCoord3D TexCoord3D
 TexCoord3D type.
 
typedef Kernel::Vertex Vertex
 Vertex type.
 
typedef Kernel::Halfedge Halfedge
 Halfedge type.
 
typedef Kernel::Edge Edge
 Edge type.
 
typedef Kernel::Face Face
 Face type.
 
typedef Kernel::VertexHandle VertexHandle
 Handle for referencing the corresponding item.
 
typedef Kernel::HalfedgeHandle HalfedgeHandle
 Scalar type.
 
typedef Kernel::EdgeHandle EdgeHandle
 Scalar type.
 
typedef Kernel::FaceHandle FaceHandle
 Scalar type.
 
typedef Kernel::VertexIter VertexIter
 Scalar type.
 
typedef Kernel::HalfedgeIter HalfedgeIter
 Scalar type.
 
typedef Kernel::EdgeIter EdgeIter
 Scalar type.
 
typedef Kernel::FaceIter FaceIter
 Scalar type.
 
typedef Kernel::ConstVertexIter ConstVertexIter
 Scalar type.
 
typedef Kernel::ConstHalfedgeIter ConstHalfedgeIter
 Scalar type.
 
typedef Kernel::ConstEdgeIter ConstEdgeIter
 Scalar type.
 
typedef Kernel::ConstFaceIter ConstFaceIter
 Scalar type.
 

Static Public Member Functions

static constexpr bool is_polymesh ()
 Determine whether this is a PolyMeshT or TriMeshT (This function does not check the per face vertex count! It only checks if the datatype is PolyMeshT or TriMeshT)
 
static constexpr bool is_trimesh ()
 

Mesh Circulators

Refer to OpenMesh::Mesh::Iterators or Mesh Iterators and Circulators for documentation.

typedef Kernel::VertexVertexIter VertexVertexIter
 Circulator.
 
typedef Kernel::VertexOHalfedgeIter VertexOHalfedgeIter
 Circulator.
 
typedef Kernel::VertexIHalfedgeIter VertexIHalfedgeIter
 Circulator.
 
typedef Kernel::VertexEdgeIter VertexEdgeIter
 Circulator.
 
typedef Kernel::VertexFaceIter VertexFaceIter
 Circulator.
 
typedef Kernel::FaceVertexIter FaceVertexIter
 Circulator.
 
typedef Kernel::FaceHalfedgeIter FaceHalfedgeIter
 Circulator.
 
typedef Kernel::FaceEdgeIter FaceEdgeIter
 Circulator.
 
typedef Kernel::FaceFaceIter FaceFaceIter
 Circulator.
 
typedef Kernel::ConstVertexVertexIter ConstVertexVertexIter
 Circulator.
 
typedef Kernel::ConstVertexOHalfedgeIter ConstVertexOHalfedgeIter
 Circulator.
 
typedef Kernel::ConstVertexIHalfedgeIter ConstVertexIHalfedgeIter
 Circulator.
 
typedef Kernel::ConstVertexEdgeIter ConstVertexEdgeIter
 Circulator.
 
typedef Kernel::ConstVertexFaceIter ConstVertexFaceIter
 Circulator.
 
typedef Kernel::ConstFaceVertexIter ConstFaceVertexIter
 Circulator.
 
typedef Kernel::ConstFaceHalfedgeIter ConstFaceHalfedgeIter
 Circulator.
 
typedef Kernel::ConstFaceEdgeIter ConstFaceEdgeIter
 Circulator.
 
typedef Kernel::ConstFaceFaceIter ConstFaceFaceIter
 Circulator.
 
 PolyMeshT ()
 Circulator.
 
template<typename T >
 PolyMeshT (const T &t)
 Circulator.
 
virtual ~PolyMeshT ()
 Circulator.
 
template<typename H , typename = SmartHandle<H>>
auto make_smart (H const &h) const -> typename SmartHandle< H >::type const
 Create a smart handle from a regular handle.
 
template<typename SH , typename = typename std::enable_if<std::is_base_of<SmartBaseHandle, SH>::value>::type>
SH make_smart (SH const &sh) const
 Return the passed smart handle. This allows for code using make_smart(h) to keep compiling when h's type is changed to a smart handle.
 
SmartVertexHandle new_vertex ()
 Adds a new default-initialized vertex.
 
SmartVertexHandle new_vertex (const Point _p)
 Adds a new vertex initialized to a custom position.
 
SmartVertexHandle new_vertex_dirty (const Point _p)
 
SmartVertexHandle add_vertex (const Point _p)
 
SmartVertexHandle add_vertex_dirty (const Point _p)
 Alias for new_vertex_dirty().
 

Normal vector computation

void update_normals ()
 Compute normals for all primitives.
 
void update_normal (FaceHandle _fh)
 Update normal for face _fh.
 
void update_face_normals ()
 Update normal vectors for all faces.
 
virtual Normal calc_face_normal (FaceHandle _fh) const
 
Normal calc_face_normal (const Point &_p0, const Point &_p1, const Point &_p2) const
 
Normal calc_normal (FaceHandle _fh) const
 same as calc_face_normal
 
void calc_face_centroid (FaceHandle _fh, Point &_pt) const
 calculates the average of the vertices defining _fh
 
Point calc_face_centroid (FaceHandle _fh) const
 Computes and returns the average of the vertices defining _fh.
 
Point calc_centroid (FaceHandle _fh) const
 Computes and returns the average of the vertices defining _fh (same as calc_face_centroid)
 
Point calc_centroid (EdgeHandle _eh) const
 Computes and returns the average of the vertices defining _eh (same as calc_edge_midpoint)
 
Point calc_centroid (HalfedgeHandle _heh) const
 Computes and returns the average of the vertices defining _heh (same as calc_edge_midpoint for edge of halfedge)
 
Point calc_centroid (VertexHandle _vh) const
 Returns the point of _vh.
 
Point calc_centroid (MeshHandle _mh) const
 Computes and returns the average of the vertices defining the mesh.
 
void update_normal (HalfedgeHandle _heh, const double _feature_angle=0.8)
 Update normal for halfedge _heh.
 
void update_halfedge_normals (const double _feature_angle=0.8)
 Update normal vectors for all halfedges.
 
virtual Normal calc_halfedge_normal (HalfedgeHandle _heh, const double _feature_angle=0.8) const
 Calculate halfedge normal for one specific halfedge.
 
Normal calc_normal (HalfedgeHandle, const double _feature_angle=0.8) const
 same as calc_halfedge_normal
 
bool is_estimated_feature_edge (HalfedgeHandle _heh, const double _feature_angle) const
 
void update_normal (VertexHandle _vh)
 Update normal for vertex _vh.
 
void update_vertex_normals ()
 Update normal vectors for all vertices.
 
Normal calc_vertex_normal (VertexHandle _vh) const
 Calculate vertex normal for one specific vertex.
 
void calc_vertex_normal_fast (VertexHandle _vh, Normal &_n) const
 
void calc_vertex_normal_correct (VertexHandle _vh, Normal &_n) const
 Compute normals for all primitives.
 
void calc_vertex_normal_loop (VertexHandle _vh, Normal &_n) const
 Compute normals for all primitives.
 
Normal calc_normal (VertexHandle _vh) const
 same as calc_vertex_normal_correct
 
void calc_edge_vector (EdgeHandle _eh, Normal &_edge_vec) const
 
Normal calc_edge_vector (EdgeHandle _eh) const
 
void calc_edge_vector (HalfedgeHandle _heh, Normal &_edge_vec) const
 
Normal calc_edge_vector (HalfedgeHandle _heh) const
 
Scalar calc_edge_length (EdgeHandle _eh) const
 Compute normals for all primitives.
 
Scalar calc_edge_length (HalfedgeHandle _heh) const
 
Scalar calc_edge_sqr_length (EdgeHandle _eh) const
 Compute normals for all primitives.
 
Scalar calc_edge_sqr_length (HalfedgeHandle _heh) const
 Compute normals for all primitives.
 
Point calc_edge_midpoint (HalfedgeHandle _heh) const
 
Point calc_edge_midpoint (EdgeHandle _eh) const
 
Normal calc_normal (EdgeHandle _eh) const
 calculated and returns the average of the two vertex normals
 
void calc_sector_vectors (HalfedgeHandle _in_heh, Normal &_vec0, Normal &_vec1) const
 
Scalar calc_sector_angle (HalfedgeHandle _in_heh) const
 
void calc_sector_normal (HalfedgeHandle _in_heh, Normal &_sector_normal) const
 
Scalar calc_sector_area (HalfedgeHandle _in_heh) const
 
Scalar calc_dihedral_angle_fast (HalfedgeHandle _heh) const
 
Scalar calc_dihedral_angle_fast (EdgeHandle _eh) const
 
Scalar calc_dihedral_angle (HalfedgeHandle _heh) const
 Compute normals for all primitives.
 
Scalar calc_dihedral_angle (EdgeHandle _eh) const
 Compute normals for all primitives.
 
unsigned int find_feature_edges (Scalar _angle_tresh=OpenMesh::deg_to_rad(44.0))
 
void split (FaceHandle _fh, const Point &_p)
 Face split (= 1-to-n split)
 
void split (FaceHandle _fh, VertexHandle _vh)
 Compute normals for all primitives.
 
void split (EdgeHandle _eh, const Point &_p)
 Compute normals for all primitives.
 
void split (EdgeHandle _eh, VertexHandle _vh)
 Compute normals for all primitives.
 
Normal calc_face_normal_impl (FaceHandle, PointIs3DTag) const
 Compute normals for all primitives.
 
Normal calc_face_normal_impl (FaceHandle, PointIsNot3DTag) const
 Compute normals for all primitives.
 
Normal calc_face_normal_impl (const Point &, const Point &, const Point &, PointIs3DTag) const
 Compute normals for all primitives.
 
Normal calc_face_normal_impl (const Point &, const Point &, const Point &, PointIsNot3DTag) const
 Compute normals for all primitives.
 

Detailed Description

template<class Kernel>
class OpenMesh::PolyMeshT< Kernel >

Base type for a polygonal mesh.

This is the base class for a polygonal mesh. It is parameterized by a mesh kernel that is given as a template argument. This class inherits all methods from its mesh kernel.

Parameters
Kerneltemplate argument for the mesh kernel
Note
You should use the predefined mesh-kernel combinations in Predefined Mesh Types
See also
Specifying your MyMesh

Definition at line 90 of file PolyMeshT.hh.

Member Typedef Documentation

◆ Color

template<class Kernel >
typedef Kernel::Color OpenMesh::PolyMeshT< Kernel >::Color

Color type.

Definition at line 116 of file PolyMeshT.hh.

◆ ConnectivityTag

template<class Kernel >
using OpenMesh::PolyMeshT< Kernel >::ConnectivityTag = PolyConnectivityTag

Definition at line 102 of file PolyMeshT.hh.

◆ ConstEdgeIter

template<class Kernel >
typedef Kernel::ConstEdgeIter OpenMesh::PolyMeshT< Kernel >::ConstEdgeIter

Scalar type.

Definition at line 150 of file PolyMeshT.hh.

◆ ConstFaceEdgeIter

template<class Kernel >
typedef Kernel::ConstFaceEdgeIter OpenMesh::PolyMeshT< Kernel >::ConstFaceEdgeIter

Circulator.

Definition at line 179 of file PolyMeshT.hh.

◆ ConstFaceFaceIter

template<class Kernel >
typedef Kernel::ConstFaceFaceIter OpenMesh::PolyMeshT< Kernel >::ConstFaceFaceIter

Circulator.

Definition at line 180 of file PolyMeshT.hh.

◆ ConstFaceHalfedgeIter

template<class Kernel >
typedef Kernel::ConstFaceHalfedgeIter OpenMesh::PolyMeshT< Kernel >::ConstFaceHalfedgeIter

Circulator.

Definition at line 178 of file PolyMeshT.hh.

◆ ConstFaceIter

template<class Kernel >
typedef Kernel::ConstFaceIter OpenMesh::PolyMeshT< Kernel >::ConstFaceIter

Scalar type.

Definition at line 151 of file PolyMeshT.hh.

◆ ConstFaceVertexIter

template<class Kernel >
typedef Kernel::ConstFaceVertexIter OpenMesh::PolyMeshT< Kernel >::ConstFaceVertexIter

Circulator.

Definition at line 177 of file PolyMeshT.hh.

◆ ConstHalfedgeIter

template<class Kernel >
typedef Kernel::ConstHalfedgeIter OpenMesh::PolyMeshT< Kernel >::ConstHalfedgeIter

Scalar type.

Definition at line 149 of file PolyMeshT.hh.

◆ ConstVertexEdgeIter

template<class Kernel >
typedef Kernel::ConstVertexEdgeIter OpenMesh::PolyMeshT< Kernel >::ConstVertexEdgeIter

Circulator.

Definition at line 175 of file PolyMeshT.hh.

◆ ConstVertexFaceIter

template<class Kernel >
typedef Kernel::ConstVertexFaceIter OpenMesh::PolyMeshT< Kernel >::ConstVertexFaceIter

Circulator.

Definition at line 176 of file PolyMeshT.hh.

◆ ConstVertexIHalfedgeIter

template<class Kernel >
typedef Kernel::ConstVertexIHalfedgeIter OpenMesh::PolyMeshT< Kernel >::ConstVertexIHalfedgeIter

Circulator.

Definition at line 174 of file PolyMeshT.hh.

◆ ConstVertexIter

template<class Kernel >
typedef Kernel::ConstVertexIter OpenMesh::PolyMeshT< Kernel >::ConstVertexIter

Scalar type.

Definition at line 148 of file PolyMeshT.hh.

◆ ConstVertexOHalfedgeIter

template<class Kernel >
typedef Kernel::ConstVertexOHalfedgeIter OpenMesh::PolyMeshT< Kernel >::ConstVertexOHalfedgeIter

Circulator.

Definition at line 173 of file PolyMeshT.hh.

◆ ConstVertexVertexIter

template<class Kernel >
typedef Kernel::ConstVertexVertexIter OpenMesh::PolyMeshT< Kernel >::ConstVertexVertexIter

Circulator.

Definition at line 172 of file PolyMeshT.hh.

◆ Edge

template<class Kernel >
typedef Kernel::Edge OpenMesh::PolyMeshT< Kernel >::Edge

Edge type.

Definition at line 128 of file PolyMeshT.hh.

◆ EdgeHandle

template<class Kernel >
typedef Kernel::EdgeHandle OpenMesh::PolyMeshT< Kernel >::EdgeHandle

Scalar type.

Definition at line 138 of file PolyMeshT.hh.

◆ EdgeIter

template<class Kernel >
typedef Kernel::EdgeIter OpenMesh::PolyMeshT< Kernel >::EdgeIter

Scalar type.

Definition at line 145 of file PolyMeshT.hh.

◆ Face

template<class Kernel >
typedef Kernel::Face OpenMesh::PolyMeshT< Kernel >::Face

Face type.

Definition at line 130 of file PolyMeshT.hh.

◆ FaceEdgeIter

template<class Kernel >
typedef Kernel::FaceEdgeIter OpenMesh::PolyMeshT< Kernel >::FaceEdgeIter

Circulator.

Definition at line 169 of file PolyMeshT.hh.

◆ FaceFaceIter

template<class Kernel >
typedef Kernel::FaceFaceIter OpenMesh::PolyMeshT< Kernel >::FaceFaceIter

Circulator.

Definition at line 170 of file PolyMeshT.hh.

◆ FaceHalfedgeIter

template<class Kernel >
typedef Kernel::FaceHalfedgeIter OpenMesh::PolyMeshT< Kernel >::FaceHalfedgeIter

Circulator.

Definition at line 168 of file PolyMeshT.hh.

◆ FaceHandle

template<class Kernel >
typedef Kernel::FaceHandle OpenMesh::PolyMeshT< Kernel >::FaceHandle

Scalar type.

Definition at line 139 of file PolyMeshT.hh.

◆ FaceIter

template<class Kernel >
typedef Kernel::FaceIter OpenMesh::PolyMeshT< Kernel >::FaceIter

Scalar type.

Definition at line 146 of file PolyMeshT.hh.

◆ FaceVertexIter

template<class Kernel >
typedef Kernel::FaceVertexIter OpenMesh::PolyMeshT< Kernel >::FaceVertexIter

Circulator.

Definition at line 167 of file PolyMeshT.hh.

◆ Halfedge

template<class Kernel >
typedef Kernel::Halfedge OpenMesh::PolyMeshT< Kernel >::Halfedge

Halfedge type.

Definition at line 126 of file PolyMeshT.hh.

◆ HalfedgeHandle

template<class Kernel >
typedef Kernel::HalfedgeHandle OpenMesh::PolyMeshT< Kernel >::HalfedgeHandle

Scalar type.

Definition at line 137 of file PolyMeshT.hh.

◆ HalfedgeIter

template<class Kernel >
typedef Kernel::HalfedgeIter OpenMesh::PolyMeshT< Kernel >::HalfedgeIter

Scalar type.

Definition at line 144 of file PolyMeshT.hh.

◆ Normal

template<class Kernel >
typedef Kernel::Normal OpenMesh::PolyMeshT< Kernel >::Normal

Normal type.

Definition at line 114 of file PolyMeshT.hh.

◆ Point

template<class Kernel >
typedef Kernel::Point OpenMesh::PolyMeshT< Kernel >::Point

Coordinate type.

Definition at line 112 of file PolyMeshT.hh.

◆ Scalar

template<class Kernel >
typedef Kernel::Scalar OpenMesh::PolyMeshT< Kernel >::Scalar

Scalar type.

Definition at line 110 of file PolyMeshT.hh.

◆ TexCoord1D

template<class Kernel >
typedef Kernel::TexCoord1D OpenMesh::PolyMeshT< Kernel >::TexCoord1D

TexCoord1D type.

Definition at line 118 of file PolyMeshT.hh.

◆ TexCoord2D

template<class Kernel >
typedef Kernel::TexCoord2D OpenMesh::PolyMeshT< Kernel >::TexCoord2D

TexCoord2D type.

Definition at line 120 of file PolyMeshT.hh.

◆ TexCoord3D

template<class Kernel >
typedef Kernel::TexCoord3D OpenMesh::PolyMeshT< Kernel >::TexCoord3D

TexCoord3D type.

Definition at line 122 of file PolyMeshT.hh.

◆ This

template<class Kernel >
typedef PolyMeshT<Kernel> OpenMesh::PolyMeshT< Kernel >::This

Self type. Used to specify iterators/circulators.

Definition at line 95 of file PolyMeshT.hh.

◆ Vertex

template<class Kernel >
typedef Kernel::Vertex OpenMesh::PolyMeshT< Kernel >::Vertex

Vertex type.

Definition at line 124 of file PolyMeshT.hh.

◆ VertexEdgeIter

template<class Kernel >
typedef Kernel::VertexEdgeIter OpenMesh::PolyMeshT< Kernel >::VertexEdgeIter

Circulator.

Definition at line 165 of file PolyMeshT.hh.

◆ VertexFaceIter

template<class Kernel >
typedef Kernel::VertexFaceIter OpenMesh::PolyMeshT< Kernel >::VertexFaceIter

Circulator.

Definition at line 166 of file PolyMeshT.hh.

◆ VertexHandle

template<class Kernel >
typedef Kernel::VertexHandle OpenMesh::PolyMeshT< Kernel >::VertexHandle

Handle for referencing the corresponding item.

Definition at line 136 of file PolyMeshT.hh.

◆ VertexIHalfedgeIter

template<class Kernel >
typedef Kernel::VertexIHalfedgeIter OpenMesh::PolyMeshT< Kernel >::VertexIHalfedgeIter

Circulator.

Definition at line 164 of file PolyMeshT.hh.

◆ VertexIter

template<class Kernel >
typedef Kernel::VertexIter OpenMesh::PolyMeshT< Kernel >::VertexIter

Scalar type.

Definition at line 143 of file PolyMeshT.hh.

◆ VertexOHalfedgeIter

template<class Kernel >
typedef Kernel::VertexOHalfedgeIter OpenMesh::PolyMeshT< Kernel >::VertexOHalfedgeIter

Circulator.

Definition at line 163 of file PolyMeshT.hh.

◆ VertexVertexIter

template<class Kernel >
typedef Kernel::VertexVertexIter OpenMesh::PolyMeshT< Kernel >::VertexVertexIter

Circulator.

Definition at line 162 of file PolyMeshT.hh.

Member Enumeration Documentation

◆ anonymous enum

template<class Kernel >
anonymous enum

Definition at line 103 of file PolyMeshT.hh.

◆ anonymous enum

template<class Kernel >
anonymous enum

Definition at line 104 of file PolyMeshT.hh.

Constructor & Destructor Documentation

◆ PolyMeshT() [1/2]

template<class Kernel >
OpenMesh::PolyMeshT< Kernel >::PolyMeshT ( )
inline

Circulator.

Definition at line 185 of file PolyMeshT.hh.

◆ PolyMeshT() [2/2]

template<class Kernel >
template<typename T >
OpenMesh::PolyMeshT< Kernel >::PolyMeshT ( const T &  t)
inlineexplicit

Circulator.

Definition at line 187 of file PolyMeshT.hh.

◆ ~PolyMeshT()

template<class Kernel >
virtual OpenMesh::PolyMeshT< Kernel >::~PolyMeshT ( )
inlinevirtual

Circulator.

Definition at line 188 of file PolyMeshT.hh.

Member Function Documentation

◆ add_vertex()

template<class Kernel >
SmartVertexHandle OpenMesh::PolyMeshT< Kernel >::add_vertex ( const Point  _p)
inline

Alias for new_vertex(const Point&).

Definition at line 255 of file PolyMeshT.hh.

◆ add_vertex_dirty()

template<class Kernel >
SmartVertexHandle OpenMesh::PolyMeshT< Kernel >::add_vertex_dirty ( const Point  _p)
inline

Alias for new_vertex_dirty().

Definition at line 259 of file PolyMeshT.hh.

◆ calc_centroid() [1/5]

template<class Kernel >
PolyMeshT< Kernel >::Point OpenMesh::PolyMeshT< Kernel >::calc_centroid ( EdgeHandle  _eh) const

Computes and returns the average of the vertices defining _eh (same as calc_edge_midpoint)

Definition at line 276 of file PolyMeshT_impl.hh.

◆ calc_centroid() [2/5]

template<class Kernel >
PolyMeshT< Kernel >::Point OpenMesh::PolyMeshT< Kernel >::calc_centroid ( FaceHandle  _fh) const

Computes and returns the average of the vertices defining _fh (same as calc_face_centroid)

Definition at line 266 of file PolyMeshT_impl.hh.

◆ calc_centroid() [3/5]

template<class Kernel >
PolyMeshT< Kernel >::Point OpenMesh::PolyMeshT< Kernel >::calc_centroid ( HalfedgeHandle  _heh) const

Computes and returns the average of the vertices defining _heh (same as calc_edge_midpoint for edge of halfedge)

Definition at line 286 of file PolyMeshT_impl.hh.

◆ calc_centroid() [4/5]

template<class Kernel >
PolyMeshT< Kernel >::Point OpenMesh::PolyMeshT< Kernel >::calc_centroid ( MeshHandle  _mh) const

Computes and returns the average of the vertices defining the mesh.

Definition at line 306 of file PolyMeshT_impl.hh.

◆ calc_centroid() [5/5]

template<class Kernel >
PolyMeshT< Kernel >::Point OpenMesh::PolyMeshT< Kernel >::calc_centroid ( VertexHandle  _vh) const

Returns the point of _vh.

Definition at line 296 of file PolyMeshT_impl.hh.

◆ calc_dihedral_angle() [1/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_dihedral_angle ( EdgeHandle  _eh) const
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 597 of file PolyMeshT.hh.

◆ calc_dihedral_angle() [2/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_dihedral_angle ( HalfedgeHandle  _heh) const
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 575 of file PolyMeshT.hh.

◆ calc_dihedral_angle_fast() [1/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_dihedral_angle_fast ( EdgeHandle  _eh) const
inline

calculates the dihedral angle on the edge _eh

Attention
Needs the Attributes::Normal attribute for faces

Definition at line 571 of file PolyMeshT.hh.

◆ calc_dihedral_angle_fast() [2/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_dihedral_angle_fast ( HalfedgeHandle  _heh) const
inline

calculates the dihedral angle on the halfedge _heh

Attention
Needs the Attributes::Normal attribute for faces

Definition at line 550 of file PolyMeshT.hh.

◆ calc_edge_length() [1/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_edge_length ( EdgeHandle  _eh) const
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 434 of file PolyMeshT.hh.

◆ calc_edge_length() [2/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_edge_length ( HalfedgeHandle  _heh) const
inline

Calculates the length of the edge _heh

Definition at line 439 of file PolyMeshT.hh.

◆ calc_edge_midpoint() [1/2]

template<class Kernel >
Point OpenMesh::PolyMeshT< Kernel >::calc_edge_midpoint ( EdgeHandle  _eh) const
inline

Calculates the midpoint of the edge _eh, defined by the positions of the two incident vertices

Definition at line 463 of file PolyMeshT.hh.

◆ calc_edge_midpoint() [2/2]

template<class Kernel >
Point OpenMesh::PolyMeshT< Kernel >::calc_edge_midpoint ( HalfedgeHandle  _heh) const
inline

Calculates the midpoint of the halfedge _heh, defined by the positions of the two incident vertices

Definition at line 454 of file PolyMeshT.hh.

◆ calc_edge_sqr_length() [1/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_edge_sqr_length ( EdgeHandle  _eh) const
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 442 of file PolyMeshT.hh.

◆ calc_edge_sqr_length() [2/2]

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_edge_sqr_length ( HalfedgeHandle  _heh) const
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 445 of file PolyMeshT.hh.

◆ calc_edge_vector() [1/4]

template<class Kernel >
Normal OpenMesh::PolyMeshT< Kernel >::calc_edge_vector ( EdgeHandle  _eh) const
inline

Calculates the edge vector as the vector defined by the halfedge with id #0 (see below)

Definition at line 413 of file PolyMeshT.hh.

◆ calc_edge_vector() [2/4]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_edge_vector ( EdgeHandle  _eh,
Normal _edge_vec 
) const
inline

Calculates the edge vector as the vector defined by the halfedge with id #0 (see below)

Definition at line 406 of file PolyMeshT.hh.

◆ calc_edge_vector() [3/4]

template<class Kernel >
Normal OpenMesh::PolyMeshT< Kernel >::calc_edge_vector ( HalfedgeHandle  _heh) const
inline

Calculates the edge vector as the difference of the the points defined by to_vertex_handle() and from_vertex_handle()

Definition at line 427 of file PolyMeshT.hh.

◆ calc_edge_vector() [4/4]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_edge_vector ( HalfedgeHandle  _heh,
Normal _edge_vec 
) const
inline

Calculates the edge vector as the difference of the the points defined by to_vertex_handle() and from_vertex_handle()

Definition at line 420 of file PolyMeshT.hh.

◆ calc_face_centroid() [1/2]

template<class Kernel >
PolyMeshT< Kernel >::Point OpenMesh::PolyMeshT< Kernel >::calc_face_centroid ( FaceHandle  _fh) const

Computes and returns the average of the vertices defining _fh.

Definition at line 248 of file PolyMeshT_impl.hh.

◆ calc_face_centroid() [2/2]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_face_centroid ( FaceHandle  _fh,
Point _pt 
) const
inline

calculates the average of the vertices defining _fh

Definition at line 299 of file PolyMeshT.hh.

◆ calc_face_normal() [1/2]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_face_normal ( const Point _p0,
const Point _p1,
const Point _p2 
) const

Calculate normal vector for face (_p0, _p1, _p2).

Definition at line 172 of file PolyMeshT_impl.hh.

◆ calc_face_normal() [2/2]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_face_normal ( FaceHandle  _fh) const
virtual

Calculate normal vector for face _fh.

Reimplemented in OpenMesh::TriMeshT< Kernel >.

Definition at line 97 of file PolyMeshT_impl.hh.

◆ calc_face_normal_impl() [1/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_face_normal_impl ( const Point _p0,
const Point _p1,
const Point _p2,
PointIs3DTag   
) const
private

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 194 of file PolyMeshT_impl.hh.

◆ calc_face_normal_impl() [2/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_face_normal_impl ( const Point ,
const Point ,
const Point ,
PointIsNot3DTag   
) const
private

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 229 of file PolyMeshT_impl.hh.

◆ calc_face_normal_impl() [3/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_face_normal_impl ( FaceHandle  _fh,
PointIs3DTag   
) const
private

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 108 of file PolyMeshT_impl.hh.

◆ calc_face_normal_impl() [4/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_face_normal_impl ( FaceHandle  ,
PointIsNot3DTag   
) const
private

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 154 of file PolyMeshT_impl.hh.

◆ calc_halfedge_normal()

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_halfedge_normal ( HalfedgeHandle  _heh,
const double  _feature_angle = 0.8 
) const
virtual

Calculate halfedge normal for one specific halfedge.

Calculate normal vector for halfedge _heh.

Note
Face normals have to be computed first!
Attention
Needs the Attributes::Normal attribute for faces and vertices. Call request_face_normals() and request_halfedge_normals() before using it!
Parameters
_hehHandle of the halfedge
_feature_angleIf the dihedral angle across this edge is greater than this value, the edge is considered as a feature edge (angle in radians)

Definition at line 364 of file PolyMeshT_impl.hh.

◆ calc_normal() [1/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_normal ( EdgeHandle  _eh) const

calculated and returns the average of the two vertex normals

Definition at line 429 of file PolyMeshT_impl.hh.

◆ calc_normal() [2/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_normal ( FaceHandle  _fh) const

same as calc_face_normal

Definition at line 186 of file PolyMeshT_impl.hh.

◆ calc_normal() [3/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_normal ( HalfedgeHandle  _heh,
const double  _feature_angle = 0.8 
) const

same as calc_halfedge_normal

Definition at line 417 of file PolyMeshT_impl.hh.

◆ calc_normal() [4/4]

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_normal ( VertexHandle  _vh) const

same as calc_vertex_normal_correct

Definition at line 559 of file PolyMeshT_impl.hh.

◆ calc_sector_angle()

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_sector_angle ( HalfedgeHandle  _in_heh) const
inline

calculates the sector angle.
The vertex pointed by _in_heh defines the sector center The angle will be calculated between the given halfedge and the next halfedge.
Seen from the center vertex this will be the next halfedge in clockwise direction.
NOTE: only boundary concave sectors are treated correctly

Definition at line 486 of file PolyMeshT.hh.

◆ calc_sector_area()

template<class Kernel >
Scalar OpenMesh::PolyMeshT< Kernel >::calc_sector_area ( HalfedgeHandle  _in_heh) const
inline

calculates the area of the face sector defined by the angle <(_in_heh,next_halfedge(_in_heh)) NOTE: special cases (e.g. concave sectors) are not handled correctly

Definition at line 541 of file PolyMeshT.hh.

◆ calc_sector_normal()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_sector_normal ( HalfedgeHandle  _in_heh,
Normal _sector_normal 
) const
inline

calculates the normal (non-normalized) of the face sector defined by the angle <(_in_heh,next_halfedge(_in_heh))

Definition at line 531 of file PolyMeshT.hh.

◆ calc_sector_vectors()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_sector_vectors ( HalfedgeHandle  _in_heh,
Normal _vec0,
Normal _vec1 
) const
inline

defines a consistent representation of a sector geometry: the halfedge _in_heh defines the sector orientation the vertex pointed by _in_heh defines the sector center _vec0 and _vec1 are resp. the first and the second vectors defining the sector

Definition at line 475 of file PolyMeshT.hh.

◆ calc_vertex_normal()

template<class Kernel >
PolyMeshT< Kernel >::Normal OpenMesh::PolyMeshT< Kernel >::calc_vertex_normal ( VertexHandle  _vh) const

Calculate vertex normal for one specific vertex.

Calculate normal vector for vertex _vh by averaging normals of adjacent faces.

Note
Face normals have to be computed first!
Attention
Needs the Attributes::Normal attribute for faces and vertices. Call request_face_normals() and request_vertex_normals() before using it!
Parameters
_vhHandle of the vertex

Definition at line 482 of file PolyMeshT_impl.hh.

◆ calc_vertex_normal_correct()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_vertex_normal_correct ( VertexHandle  _vh,
Normal _n 
) const

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 506 of file PolyMeshT_impl.hh.

◆ calc_vertex_normal_fast()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_vertex_normal_fast ( VertexHandle  _vh,
Normal _n 
) const

Different methods for calculation of the normal at _vh:

  • ..._fast - the default one - the same as calc vertex_normal()
  • ..._correct - works properly for non-triangular meshes
    • does not need any attributes
  • ..._loop - calculates loop surface normals
    • does not need any attributes

Definition at line 496 of file PolyMeshT_impl.hh.

◆ calc_vertex_normal_loop()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::calc_vertex_normal_loop ( VertexHandle  _vh,
Normal _n 
) const

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 537 of file PolyMeshT_impl.hh.

◆ find_feature_edges()

template<class Kernel >
uint OpenMesh::PolyMeshT< Kernel >::find_feature_edges ( Scalar  _angle_tresh = OpenMesh::deg_to_rad(44.0))

tags an edge as a feature if its dihedral angle is larger than _angle_tresh returns the number of the found feature edges, requires edge_status property

Definition at line 74 of file PolyMeshT_impl.hh.

◆ is_estimated_feature_edge()

template<class Kernel >
bool OpenMesh::PolyMeshT< Kernel >::is_estimated_feature_edge ( HalfedgeHandle  _heh,
const double  _feature_angle 
) const

identifies feature edges w.r.t. the minimal dihedral angle for feature edges (in radians) and the status feature tag

Definition at line 451 of file PolyMeshT_impl.hh.

◆ is_polymesh()

template<class Kernel >
static constexpr bool OpenMesh::PolyMeshT< Kernel >::is_polymesh ( )
inlinestaticconstexpr

Determine whether this is a PolyMeshT or TriMeshT (This function does not check the per face vertex count! It only checks if the datatype is PolyMeshT or TriMeshT)

Definition at line 100 of file PolyMeshT.hh.

◆ is_trimesh()

template<class Kernel >
static constexpr bool OpenMesh::PolyMeshT< Kernel >::is_trimesh ( )
inlinestaticconstexpr

Definition at line 101 of file PolyMeshT.hh.

◆ make_smart() [1/2]

template<class Kernel >
template<typename H , typename = SmartHandle<H>>
auto OpenMesh::PolyMeshT< Kernel >::make_smart ( H const &  h) const -> typename SmartHandle<H>::type const
inline

Create a smart handle from a regular handle.

Uses default copy and assignment operator. Use them to assign two meshes of equal type. If the mesh types vary, use PolyMeshT::assign() instead.

Definition at line 201 of file PolyMeshT.hh.

◆ make_smart() [2/2]

template<class Kernel >
template<typename SH , typename = typename std::enable_if<std::is_base_of<SmartBaseHandle, SH>::value>::type>
SH OpenMesh::PolyMeshT< Kernel >::make_smart ( SH const &  sh) const
inline

Return the passed smart handle. This allows for code using make_smart(h) to keep compiling when h's type is changed to a smart handle.

Definition at line 210 of file PolyMeshT.hh.

◆ new_vertex() [1/2]

template<class Kernel >
SmartVertexHandle OpenMesh::PolyMeshT< Kernel >::new_vertex ( )
inline

Adds a new default-initialized vertex.

See also
new_vertex(const Point&), new_vertex_dirty()

Definition at line 218 of file PolyMeshT.hh.

◆ new_vertex() [2/2]

template<class Kernel >
SmartVertexHandle OpenMesh::PolyMeshT< Kernel >::new_vertex ( const Point  _p)
inline

Adds a new vertex initialized to a custom position.

See also
new_vertex(), new_vertex_dirty()

Definition at line 227 of file PolyMeshT.hh.

◆ new_vertex_dirty()

template<class Kernel >
SmartVertexHandle OpenMesh::PolyMeshT< Kernel >::new_vertex_dirty ( const Point  _p)
inline

Same as new_vertex(const Point&) but never shrinks, only enlarges the vertex property vectors.

If you are rebuilding a mesh that you erased with ArrayKernel::clean() or ArrayKernel::clean_keep_reservation() using this method instead of new_vertex(const Point &) saves reallocation and reinitialization of property memory.

See also
new_vertex(const Point )

Definition at line 245 of file PolyMeshT.hh.

◆ split() [1/4]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::split ( EdgeHandle  _eh,
const Point _p 
)
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 612 of file PolyMeshT.hh.

◆ split() [2/4]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::split ( EdgeHandle  _eh,
VertexHandle  _vh 
)
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 615 of file PolyMeshT.hh.

◆ split() [3/4]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::split ( FaceHandle  _fh,
const Point _p 
)
inline

Face split (= 1-to-n split)

Definition at line 606 of file PolyMeshT.hh.

◆ split() [4/4]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::split ( FaceHandle  _fh,
VertexHandle  _vh 
)
inline

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 609 of file PolyMeshT.hh.

◆ update_face_normals()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::update_face_normals ( )

Update normal vectors for all faces.

Attention
Needs the Attributes::Normal attribute for faces. Call request_face_normals() before using it!

Definition at line 334 of file PolyMeshT_impl.hh.

◆ update_halfedge_normals()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::update_halfedge_normals ( const double  _feature_angle = 0.8)

Update normal vectors for all halfedges.

Uses the existing face normals to compute halfedge normals

Note
Face normals have to be computed first!
Attention
Needs the Attributes::Normal attribute for faces and halfedges. Call request_face_normals() and request_halfedge_normals() before using it!

Definition at line 349 of file PolyMeshT_impl.hh.

◆ update_normal() [1/3]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::update_normal ( FaceHandle  _fh)
inline

Update normal for face _fh.

Definition at line 278 of file PolyMeshT.hh.

◆ update_normal() [2/3]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::update_normal ( HalfedgeHandle  _heh,
const double  _feature_angle = 0.8 
)
inline

Update normal for halfedge _heh.

Definition at line 322 of file PolyMeshT.hh.

◆ update_normal() [3/3]

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::update_normal ( VertexHandle  _vh)
inline

Update normal for vertex _vh.

Definition at line 358 of file PolyMeshT.hh.

◆ update_normals()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::update_normals ( )

Compute normals for all primitives.

Calls update_face_normals() , update_halfedge_normals() and update_vertex_normals() if the normals (i.e. the properties) exist.

Note
Face normals are required to compute vertex and halfedge normals!

Definition at line 316 of file PolyMeshT_impl.hh.

◆ update_vertex_normals()

template<class Kernel >
void OpenMesh::PolyMeshT< Kernel >::update_vertex_normals ( )

Update normal vectors for all vertices.

Uses existing face normals to calculate new vertex normals.

Note
Face normals have to be computed first!
Attention
Needs the Attributes::Normal attribute for faces and vertices. Call request_face_normals() and request_vertex_normals() before using it!

Definition at line 571 of file PolyMeshT_impl.hh.


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