Namespaces | Classes | Functions

OpenTissue::polymesh Namespace Reference

Namespaces

namespace  detail

Classes

class  PolyMeshFaceEdgeCirculator
class  PolyMeshFaceFaceCirculator
class  PolyMeshFaceHalfedgeCirculator
class  PolyMeshFaceVertexCirculator
class  PolyMeshVertexEdgeCirculator
class  PolyMeshVertexFaceCirculator
class  PolyMeshVertexHalfedgeCirculator
class  PolyMeshVertexVertexCirculator
class  PolyMeshListKernel
class  PolyMesh
class  polymesh_core_access
class  PolyMeshEdge
class  PolyMeshFace
class  PolyMeshHalfEdge
class  PolyMeshVertex
struct  center_vertex_policy
struct  voronoi_vertex_policy
class  PolyMeshTriangulate

Functions

template<typename point_container , typename mesh_type >
void compute_delaunay2D (point_container const &vertices, mesh_type &mesh)
template<typename mesh_type , typename vector3_type >
vector3_type::value_type compute_distance (PolyMeshVertex< mesh_type > const &v, vector3_type const &p)
template<typename mesh_type , typename vector3_type >
vector3_type::value_type compute_distance (PolyMeshFace< mesh_type > const &f, vector3_type const &p)
template<typename mesh_type , typename vector3_type >
vector3_type::value_type compute_distance (PolyMeshEdge< mesh_type > const &e, vector3_type const &p)
template<typename mesh_type , typename vertex_policy >
void compute_dual (mesh_type const &original, mesh_type &dual, vertex_policy const &)
template<typename mesh_type >
void compute_dual (mesh_type const &original, mesh_type &dual)
template<typename halfedge_type , typename vector3_type >
void compute_edge_direction (halfedge_type const &h, vector3_type &u)
template<typename halfedge_type , typename face_type , typename plane_type >
void compute_edge_face_voronoi_plane (halfedge_type const &h, face_type const &f, plane_type &plane)
template<typename mesh_type >
mesh_type::math_types::real_type compute_face_area (PolyMeshFace< mesh_type > const &f)
template<typename mesh_type , typename vector3_type >
void compute_face_normal (PolyMeshFace< mesh_type > const &f, vector3_type &normal)
template<typename mesh_type , typename real_type >
void compute_minmax_edge_length (mesh_type const &mesh, real_type &min_length, real_type &max_length, real_type &avg_length)
template<typename vertex_type , typename halfedge_type , typename plane_type >
void compute_vertex_edge_voronoi_plane (vertex_type const &v, halfedge_type const &h, plane_type &plane)
template<typename mesh_type , typename real_type2 >
bool compute_vertex_gaussian_curvature (PolyMeshVertex< mesh_type > const &v, real_type2 &Kg)
template<typename mesh_type >
bool compute_vertex_mean_curvature_normal (PolyMeshVertex< mesh_type > const &v, typename mesh_type::math_types::vector3_type &Kh)
template<typename point_container , typename mesh_type >
void compute_voronoi (point_container const &sites, mesh_type &mesh, mesh_type &delaunay)
template<typename point_container , typename mesh_type >
void compute_voronoi (point_container const &sites, mesh_type &mesh)
template<typename mesh_type , typename real_type >
void compute_dihedral_angle (PolyMeshHalfEdge< mesh_type > const &e, real_type &radian)
template<typename mesh_type , typename real_type >
void compute_dihedral_angle (PolyMeshEdge< mesh_type > const &e, real_type &radian)
template<typename mesh_type >
bool edge_flip (PolyMeshHalfEdge< mesh_type > &h)
template<typename mesh_type >
bool edge_flip (PolyMeshEdge< mesh_type > const &e)
template<typename mesh_type >
bool face_collapse (PolyMeshFace< mesh_type > &f)
template<typename mesh_type >
bool face_merge (PolyMeshFace< mesh_type > &f0, PolyMeshFace< mesh_type > &f1)
template<typename mesh_type >
bool face_split (PolyMeshFace< mesh_type > &f, PolyMeshVertex< mesh_type > &v0, PolyMeshVertex< mesh_type > &v1)
template<typename mesh_type >
bool face_subdivide (PolyMeshFace< mesh_type > &f)
template<typename mesh_type >
bool face_subdivide2 (PolyMeshFace< mesh_type > &f)
template<typename mesh_type , typename vertex_ptr_container >
void get_face_vertices (PolyMeshFace< mesh_type > &face, vertex_ptr_container &vertices)
template<typename mesh_type >
bool intelligent_patcher (mesh_type &mesh)
template<typename mesh_type >
bool is_boundary (PolyMeshHalfEdge< mesh_type > const &h)
template<typename mesh_type >
bool is_boundary (PolyMeshVertex< mesh_type > const &v)
template<typename mesh_type >
bool is_boundary (PolyMeshEdge< mesh_type > const &e)
template<typename mesh_type >
bool is_boundary (PolyMeshFace< mesh_type > const &f)
template<typename mesh_type , typename real_type >
bool is_collinear (PolyMeshFace< mesh_type > const &f, real_type const &tolerance)
template<typename mesh_type >
bool is_collinear (PolyMeshFace< mesh_type > const &f)
template<typename mesh_type , typename real_type >
bool is_concave (PolyMeshHalfEdge< mesh_type > const &e, real_type const &tolerance)
template<typename mesh_type >
bool is_concave (PolyMeshHalfEdge< mesh_type > const &e)
template<typename mesh_type , typename real_type >
bool is_concave (PolyMeshVertex< mesh_type > const &v, real_type const &tolerance)
template<typename mesh_type >
bool is_concave (PolyMeshVertex< mesh_type > const &v)
template<typename mesh_type , typename real_type >
bool is_convex (PolyMeshHalfEdge< mesh_type > const &e, real_type const &tolerance)
template<typename mesh_type >
bool is_convex (PolyMeshHalfEdge< mesh_type > const &e)
template<typename mesh_type , typename real_type >
bool is_convex (PolyMeshFace< mesh_type > const &face, real_type const &tolerance)
template<typename mesh_type >
bool is_convex (PolyMeshFace< mesh_type > const &face)
template<typename mesh_type , typename real_type >
bool is_convex (PolyMeshVertex< mesh_type > const &v, real_type const &tolerance)
template<typename mesh_type >
bool is_convex (PolyMeshVertex< mesh_type > const &v)
template<typename mesh_type , typename real_type >
bool is_convex (mesh_type const &mesh, real_type const &tolerance)
template<typename mesh_type >
bool is_convex (mesh_type const &mesh)
template<typename mesh_type >
bool is_convex_boundary (PolyMeshFace< mesh_type > const &f)
template<typename mesh_type >
bool is_manifold (mesh_type const &mesh)
template<typename mesh_type >
bool is_neighbor (PolyMeshFace< mesh_type > const &f, PolyMeshVertex< mesh_type > const &vertex)
template<typename mesh_type >
bool is_neighbor (PolyMeshFace< mesh_type > const &f, PolyMeshHalfEdge< mesh_type > const &h)
template<typename mesh_type >
bool is_neighbor (PolyMeshFace< mesh_type > const &face, PolyMeshEdge< mesh_type > const &e)
template<typename mesh_type >
bool is_neighbor (PolyMeshFace< mesh_type > const &f0, PolyMeshFace< mesh_type > const &f1)
template<typename mesh_type , typename real_type >
bool is_planar (PolyMeshHalfEdge< mesh_type > const &e, real_type const &tolerance)
template<typename mesh_type >
bool is_planar (PolyMeshHalfEdge< mesh_type > const &e)
template<typename mesh_type , typename real_type >
bool is_planar (PolyMeshFace< mesh_type > const &f, real_type const &tolerance)
template<typename mesh_type >
bool is_planar (PolyMeshFace< mesh_type > const &f)
template<typename mesh_type , typename real_type >
bool is_planar (PolyMeshVertex< mesh_type > const &v, real_type const &tolerance)
template<typename mesh_type >
bool is_planar (PolyMeshVertex< mesh_type > const &v)
template<typename mesh_type , typename vector3_type >
bool is_point_inside (mesh_type const &mesh, vector3_type const &p)
template<typename mesh_type , typename real_type >
bool is_saddle_point (PolyMeshVertex< mesh_type > const &v, real_type const &tolerance)
template<typename mesh_type >
bool is_saddle_point (PolyMeshVertex< mesh_type > const &v)
template<typename mesh_type >
bool is_shared_edge (PolyMeshEdge< mesh_type > const &e, PolyMeshFace< mesh_type > const &f0, PolyMeshFace< mesh_type > const &f1)
template<typename mesh_type >
bool is_shared_edge (PolyMeshHalfEdge< mesh_type > const &h, PolyMeshFace< mesh_type > const &f0, PolyMeshFace< mesh_type > const &f1)
template<typename mesh_type >
bool is_sharing_vertex (PolyMeshFace< mesh_type > const &f0, PolyMeshFace< mesh_type > const &f1)
template<typename mesh_type >
bool is_vertex_neighbors_triangular (PolyMeshVertex< mesh_type > const &v)
template<typename mesh_type >
void laplacian_smooth (mesh_type &mesh, double t)
template<typename mesh_type >
bool make_sphere (typename mesh_type::math_types::real_type const &radius, unsigned int n, mesh_type &mesh, bool use_tetrahedron=false)
template<typename mesh_type >
bool naive_patcher (mesh_type &mesh)
template<typename mesh_type , typename mesh_container >
bool reflex_convex_decomposition (mesh_type &mesh, mesh_container &pieces)
template<typename mesh_type >
unsigned int subdivide (mesh_type &mesh, double max_area=0.01)
template<typename mesh_type >
void taubin_smooth (mesh_type &mesh, unsigned int N)
template<typename mesh_type >
void triangulate (mesh_type &mesh, double dihedral_angle_tolerance=5.0)
template<typename mesh_type >
unsigned int valency (PolyMeshVertex< mesh_type > const &v)
template<typename mesh_type >
unsigned int valency (PolyMeshFace< mesh_type > const &f)
template<typename mesh_type >
bool vertex_expand (PolyMeshVertex< mesh_type > &v)

Function Documentation

template<typename point_container , typename mesh_type >
void OpenTissue::polymesh::compute_delaunay2D ( point_container const &  vertices,
mesh_type mesh 
)

PolyMesh Compute 2D Delaunay Triangulation.

Parameters:
vertices The resulting vertices of the triangulation.
mesh The resulting mesh.
template<typename mesh_type , typename real_type >
void OpenTissue::polymesh::compute_dihedral_angle ( PolyMeshHalfEdge< mesh_type > const &  e,
real_type radian 
)
template<typename mesh_type , typename real_type >
void OpenTissue::polymesh::compute_dihedral_angle ( PolyMeshEdge< mesh_type > const &  e,
real_type radian 
)
template<typename mesh_type , typename vector3_type >
vector3_type::value_type OpenTissue::polymesh::compute_distance ( PolyMeshEdge< mesh_type > const &  e,
vector3_type const &  p 
)
template<typename mesh_type , typename vector3_type >
vector3_type::value_type OpenTissue::polymesh::compute_distance ( PolyMeshVertex< mesh_type > const &  v,
vector3_type const &  p 
)
template<typename mesh_type , typename vector3_type >
vector3_type::value_type OpenTissue::polymesh::compute_distance ( PolyMeshFace< mesh_type > const &  f,
vector3_type const &  p 
)
template<typename mesh_type , typename vertex_policy >
void OpenTissue::polymesh::compute_dual ( mesh_type const &  original,
mesh_type dual,
vertex_policy const &   
)

PolyMesh Compute Dual Mesh.

Parameters:
original The orginal mesh.
dual The dual mesh. Coordinates and normals of the vertices in the new mesh are computed using the vertex_policy template argument. The policy is specfied using a tag argumnt.
vertex_policy A policy used to compute positions and normals of new vertices.
template<typename mesh_type >
void OpenTissue::polymesh::compute_dual ( mesh_type const &  original,
mesh_type dual 
)

PolyMesh Compute Dual Mesh.

Parameters:
original The orginal mesh.
dual The dual mesh. Coordinates and normals of the vertices in the new mesh are computed using the vertex_policy template argument. The policy is specfied using a tag argumnt.
template<typename halfedge_type , typename vector3_type >
void OpenTissue::polymesh::compute_edge_direction ( halfedge_type const &  h,
vector3_type u 
)
template<typename halfedge_type , typename face_type , typename plane_type >
void OpenTissue::polymesh::compute_edge_face_voronoi_plane ( halfedge_type const &  h,
face_type const &  f,
plane_type &  plane 
)
template<typename mesh_type >
mesh_type::math_types::real_type OpenTissue::polymesh::compute_face_area ( PolyMeshFace< mesh_type > const &  f  ) 

Compute Face Area.

Parameters:
f The face from which the area is computed.
Returns:
The face area.
template<typename mesh_type , typename vector3_type >
void OpenTissue::polymesh::compute_face_normal ( PolyMeshFace< mesh_type > const &  f,
vector3_type normal 
)
template<typename mesh_type , typename real_type >
void OpenTissue::polymesh::compute_minmax_edge_length ( mesh_type const &  mesh,
real_type min_length,
real_type max_length,
real_type avg_length 
) [inline]

Compute Mesh Edge statistics.

Parameters:
mesh A reference to a mesh object.
min_length Upon return this argument holds the minimum length of the edges.
max_length Upon return this argument holds the maximum length of the edges.
avg_length Upon return this argument holds the average length of the edges.
template<typename vertex_type , typename halfedge_type , typename plane_type >
void OpenTissue::polymesh::compute_vertex_edge_voronoi_plane ( vertex_type const &  v,
halfedge_type const &  h,
plane_type &  plane 
)
template<typename mesh_type , typename real_type2 >
bool OpenTissue::polymesh::compute_vertex_gaussian_curvature ( PolyMeshVertex< mesh_type > const &  v,
real_type2 &  Kg 
)

Compute Gaussian Curvature of Vertex. This implementation is based on the paper:

Meyer, M., Desbrun, M., Schröder, P., AND Barr, A. H. Discrete Differential Geometry Operators for Triangulated 2-Manifolds, 2002. VisMath.

Parameters:
v A reference to the vertex at which the Gaussian curvature should be computed.
Kg Upon return this argument holds the computed Gaussian curvature.
Returns:
If computation were succesfully then the return value is true otherwise it is false.
template<typename mesh_type >
bool OpenTissue::polymesh::compute_vertex_mean_curvature_normal ( PolyMeshVertex< mesh_type > const &  v,
typename mesh_type::math_types::vector3_type Kh 
)

Compute Vertex Curvature Normal. This implementation is based on the paper:

Meyer, M., Desbrun, M., Schrˆder, P., AND Barr, A. H. Discrete Differential Geometry Operators for Triangulated 2-Manifolds, 2002. VisMath.

Parameters:
v A reference to the vertex at which the curvature normal should be computed.
Kh Upon return this argument holds the computed vertex curvature normal.
Returns:
If computation were succesfully then the return value is true otherwise it is false.
template<typename point_container , typename mesh_type >
void OpenTissue::polymesh::compute_voronoi ( point_container const &  sites,
mesh_type mesh 
)

PolyMesh Compute Voronoi Diagram.

Parameters:
sites The Voronoi cell sites.
mesh The resulting mesh. Each face corresponds to a Voronoi cell of the specified sites. Infinite Voronoi cells are skipped. Therefor multiple site-points can be found in the outside (''world'') cell.
template<typename point_container , typename mesh_type >
void OpenTissue::polymesh::compute_voronoi ( point_container const &  sites,
mesh_type mesh,
mesh_type delaunay 
)

PolyMesh Compute Voronoi Diagram.

Parameters:
sites The Voronoi cell sites.
mesh The resulting mesh. Each face corresponds to a Voronoi cell of the specified sites. Infinite Voronoi cells are skipped. Therefor multiple site-points can be found in the outside (''world'') cell.
delaunay The corresponding delaunay triangulation.
template<typename mesh_type >
bool OpenTissue::polymesh::edge_flip ( PolyMeshHalfEdge< mesh_type > &  h  ) 

Warning indices and handles of affected primitives may not be preserved!!!

template<typename mesh_type >
bool OpenTissue::polymesh::edge_flip ( PolyMeshEdge< mesh_type > const &  e  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::face_collapse ( PolyMeshFace< mesh_type > &  f  ) 

Collapse Face into a Vertex.

Warning indices and handles of affected primitives may not be preserved!!!

Work in Progress, does not quite work as it should!!!

Parameters:
f 
Returns:
template<typename mesh_type >
bool OpenTissue::polymesh::face_merge ( PolyMeshFace< mesh_type > &  f0,
PolyMeshFace< mesh_type > &  f1 
)

Warning indices and handles of affected primitives may not be preserved!!!

Parameters:
f0 
f1 
Returns:
template<typename mesh_type >
bool OpenTissue::polymesh::face_split ( PolyMeshFace< mesh_type > &  f,
PolyMeshVertex< mesh_type > &  v0,
PolyMeshVertex< mesh_type > &  v1 
)

Warning indices and handles of affected primitives may not be preserved!!!

Parameters:
f 
v0 
v1 
Returns:
template<typename mesh_type >
bool OpenTissue::polymesh::face_subdivide ( PolyMeshFace< mesh_type > &  f  ) 

Subdivide a Face into smaller faces. This subdivision is based on adding a new vertex at the midpoint of the face.

Before

+ / \ / \ / \ / \ / \ +-----------+ / \ / \ / \ f / \ / \ / \ / \ / \ / \ / \ +-----------+----------+

After

+ / \ / \ / \ / \ / \ +-----------+ / \ // \ / \ \ / / \ / \ + / \ / \ | / \ / \|/ \ +-----------+----------+

Warning indices and handles of affected primitives may not be preserved!!!

Parameters:
f 
Returns:
template<typename mesh_type >
bool OpenTissue::polymesh::face_subdivide2 ( PolyMeshFace< mesh_type > &  f  ) 

Subdivide a Face into smaller faces. Subdivides face, by inserting new vertices at edge midpoints.

Before

+ / \ / \ / \ / \ / \ +-----------+ / \ / \ / \ f / \ / \ / \ / \ / \ / \ / \ +-----------+----------+

After + /|\ / | \ / | \ / | \ / | \ +-----+-----+ / \ / \ / \ / \ / \ / \ / +---- + \ / / \ / \ \ / / \ / \ \ +-----------+----------+

Warning indices and handles of affected primitives may not be preserved!!!

Parameters:
f 
Returns:
template<typename mesh_type , typename vertex_ptr_container >
void OpenTissue::polymesh::get_face_vertices ( PolyMeshFace< mesh_type > &  face,
vertex_ptr_container &  vertices 
)
template<typename mesh_type >
bool OpenTissue::polymesh::intelligent_patcher ( mesh_type mesh  ) 

Plane Patcher Algorithm (Work in Progress).

template<typename mesh_type >
bool OpenTissue::polymesh::is_boundary ( PolyMeshHalfEdge< mesh_type > const &  h  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_boundary ( PolyMeshVertex< mesh_type > const &  v  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_boundary ( PolyMeshEdge< mesh_type > const &  e  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_boundary ( PolyMeshFace< mesh_type > const &  f  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_collinear ( PolyMeshFace< mesh_type > const &  f,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_collinear ( PolyMeshFace< mesh_type > const &  f  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_concave ( PolyMeshHalfEdge< mesh_type > const &  e,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_concave ( PolyMeshHalfEdge< mesh_type > const &  e  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_concave ( PolyMeshVertex< mesh_type > const &  v,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_concave ( PolyMeshVertex< mesh_type > const &  v  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_convex ( PolyMeshVertex< mesh_type > const &  v  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_convex ( PolyMeshHalfEdge< mesh_type > const &  e,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_convex ( PolyMeshHalfEdge< mesh_type > const &  e  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_convex ( PolyMeshFace< mesh_type > const &  face,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_convex ( PolyMeshFace< mesh_type > const &  face  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_convex ( PolyMeshVertex< mesh_type > const &  v,
real_type const &  tolerance 
)
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_convex ( mesh_type const &  mesh,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_convex ( mesh_type const &  mesh  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_convex_boundary ( PolyMeshFace< mesh_type > const &  f  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_manifold ( mesh_type const &  mesh  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_neighbor ( PolyMeshFace< mesh_type > const &  f,
PolyMeshVertex< mesh_type > const &  vertex 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_neighbor ( PolyMeshFace< mesh_type > const &  f,
PolyMeshHalfEdge< mesh_type > const &  h 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_neighbor ( PolyMeshFace< mesh_type > const &  face,
PolyMeshEdge< mesh_type > const &  e 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_neighbor ( PolyMeshFace< mesh_type > const &  f0,
PolyMeshFace< mesh_type > const &  f1 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_planar ( PolyMeshHalfEdge< mesh_type > const &  e  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_planar ( PolyMeshVertex< mesh_type > const &  v  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_planar ( PolyMeshFace< mesh_type > const &  f,
real_type const &  tolerance 
)
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_planar ( PolyMeshHalfEdge< mesh_type > const &  e,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_planar ( PolyMeshFace< mesh_type > const &  f  ) 
template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_planar ( PolyMeshVertex< mesh_type > const &  v,
real_type const &  tolerance 
)
template<typename mesh_type , typename vector3_type >
bool OpenTissue::polymesh::is_point_inside ( mesh_type const &  mesh,
vector3_type const &  p 
) [inline]

This function implements an odd-even parity check using a ray shoot along a pre-defined direction.

This function has one major drawback! If a ray hits precisely on an edge, then one will compute two intersections of the polygonal surface (one hit from each face sharing the edge) and not one intersection as expected.

This is not easily fixed!

template<typename mesh_type , typename real_type >
bool OpenTissue::polymesh::is_saddle_point ( PolyMeshVertex< mesh_type > const &  v,
real_type const &  tolerance 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_saddle_point ( PolyMeshVertex< mesh_type > const &  v  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::is_shared_edge ( PolyMeshHalfEdge< mesh_type > const &  h,
PolyMeshFace< mesh_type > const &  f0,
PolyMeshFace< mesh_type > const &  f1 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_shared_edge ( PolyMeshEdge< mesh_type > const &  e,
PolyMeshFace< mesh_type > const &  f0,
PolyMeshFace< mesh_type > const &  f1 
)
template<typename mesh_type >
bool OpenTissue::polymesh::is_sharing_vertex ( PolyMeshFace< mesh_type > const &  f0,
PolyMeshFace< mesh_type > const &  f1 
)

Is Sharing A vertex. This functions tests if the two specified faces is sharing a common vertex on their boundaries.

Parameters:
f0 A constant reference to the first face.
f1 A constant reference to the second face.
Returns:
If the two faces is sharing a common vertex then the return value is true otherwise it is false,
template<typename mesh_type >
bool OpenTissue::polymesh::is_vertex_neighbors_triangular ( PolyMeshVertex< mesh_type > const &  v  ) 

Triangular Neighborhood Test Function. Test if all neighboring faces of a vertex are triangles.

Parameters:
v The specified vertex.
Returns:
If all faces are triangles then the return value is true otherwise it is false.
template<typename mesh_type >
void OpenTissue::polymesh::laplacian_smooth ( mesh_type mesh,
double  t 
)

Requires that mesh supports: is_boundary(vertex_type) and vertex_vertex_circulator

Parameters:
mesh 
t 
template<typename mesh_type >
bool OpenTissue::polymesh::make_sphere ( typename mesh_type::math_types::real_type const &  radius,
unsigned int  n,
mesh_type mesh,
bool  use_tetrahedron = false 
)

Sphere Generation.

Parameters:
radius The size of the radius of the sphere.
n The number of sub-divisions (if use_tetrahedron is on then faces = 4^n otherwise faces = 20^n).
mesh Upon return this argument holds the generated sphere.
use_tetrahedorn Controls whether sphere is genereted by subdivision of tetrahedron or icosahedron. Default value is false.
Returns:
If succesful then true otherwise false.
template<typename mesh_type >
bool OpenTissue::polymesh::naive_patcher ( mesh_type mesh  ) 
template<typename mesh_type , typename mesh_container >
bool OpenTissue::polymesh::reflex_convex_decomposition ( mesh_type mesh,
mesh_container &  pieces 
)
template<typename mesh_type >
unsigned int OpenTissue::polymesh::subdivide ( mesh_type mesh,
double  max_area = 0.01 
)

Polymesh Subdivide. Subdivides all faces with an area larger than the specified threshold.

Subdivides face, by inserting new vertices at edge midpoints.

Before

+ / \ / \ / \ / \ / \ +-----------+ / \ / \ / \ f / \ / \ / \ / \ / \ / \ / \ +-----------+----------+

After + /|\ / | \ / | \ / | \ / | \ +-----+-----+ / \ / \ / \ / \ / \ / \ / +---- + \ / / \ / \ \ / / \ / \ \ +-----------+----------+

Warning indices and handles of affected primitives may not be preserved!!!

Parameters:
mesh The mesh that should be subdivided.
max_area The area threshold value.
Returns:
The number of subdivided faces.

< The number of faces that were subdivided.

template<typename mesh_type >
void OpenTissue::polymesh::taubin_smooth ( mesh_type mesh,
unsigned int  N 
)

Requires that mesh supports: is_boundary(vertex_type) and vertex_vertex_circulator

Parameters:
mesh 
N Number of iterations.
template<typename mesh_type >
void OpenTissue::polymesh::triangulate ( mesh_type mesh,
double  dihedral_angle_tolerance = 5.0 
)

PolyMesh Triangulation. This is a convenience function making it easier to call the PolyMeshTriangulate functor.

Parameters:
mesh The mesh that should be retriangulated.
dihedral_angle_tolerance The maximum allowed dihedral angle (in degrees) for an edge-flip to occur. Default value is 5.
template<typename mesh_type >
unsigned int OpenTissue::polymesh::valency ( PolyMeshFace< mesh_type > const &  f  ) 
template<typename mesh_type >
unsigned int OpenTissue::polymesh::valency ( PolyMeshVertex< mesh_type > const &  v  ) 
template<typename mesh_type >
bool OpenTissue::polymesh::vertex_expand ( PolyMeshVertex< mesh_type > &  v  ) 

Expand Vertex into Faces.

Warning indices and handles of affected primitives may not be preserved!!!

Parameters:
v 
Returns: