Commit 18d44c13 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Added more convenient versions of calc_edge_vector to PolyMeshT.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@986 fdac6126-5c0c-442c-9429-916003d36597
parent 07e259fe
......@@ -316,14 +316,30 @@ public:
/** Calculates the edge vector as the vector defined by
the halfedge with id #0 (see below) */
void calc_edge_vector(EdgeHandle _eh, Normal& _edge_vec) const
{ calc_edge_vector( this->halfedge_handle(_eh,0), _edge_vec); }
{
_edge_vec = calc_edge_vector(_eh);
}
/** Calculates the edge vector as the vector defined by
the halfedge with id #0 (see below) */
Normal calc_edge_vector(EdgeHandle _eh) const
{
return calc_edge_vector(this->halfedge_handle(_eh,0));
}
/** Calculates the edge vector as the difference of the
the points defined by to_vertex_handle() and from_vertex_handle() */
void calc_edge_vector(HalfedgeHandle _heh, Normal& _edge_vec) const
{
_edge_vec = this->point(this->to_vertex_handle(_heh));
_edge_vec -= this->point(this->from_vertex_handle(_heh));
_edge_vec = calc_edge_vector(_heh);
}
/** Calculates the edge vector as the difference of the
the points defined by to_vertex_handle() and from_vertex_handle() */
Normal calc_edge_vector(HalfedgeHandle _heh) const
{
return this->point(this->to_vertex_handle(_heh)) -
this->point(this->from_vertex_handle(_heh));
}
// Calculates the length of the edge _eh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment