00001 #ifndef OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_UTIL_POLYMESH_COMPUTE_EDGE_FACE_VORONOI_PLANE_H 00002 #define OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_UTIL_POLYMESH_COMPUTE_EDGE_FACE_VORONOI_PLANE_H 00003 // 00004 // OpenTissue Template Library 00005 // - A generic toolbox for physics-based modeling and simulation. 00006 // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. 00007 // 00008 // OTTL is licensed under zlib: http://opensource.org/licenses/zlib-license.php 00009 // 00010 #include <OpenTissue/configuration.h> 00011 00012 #include <OpenTissue/core/containers/mesh/polymesh/util/polymesh_compute_edge_direction.h> 00013 00014 namespace OpenTissue 00015 { 00016 namespace polymesh 00017 { 00018 template<typename halfedge_type, typename face_type, typename plane_type> 00019 void compute_edge_face_voronoi_plane( halfedge_type const & h,face_type const & f, plane_type & plane) 00020 { 00021 assert(h.get_face_handle() == f.get_handle() || !"h must be border of f"); 00022 typename plane_type::vector3_type n,u; 00023 00024 compute_face_normal(f,n); 00025 compute_edge_direction(h,u); 00026 typename plane_type::vector3_type m = cross(n , u); 00027 plane.set(m,h.get_origin_iterator()->m_coord); 00028 } 00029 00030 } // namespace polymesh 00031 } // namespace OpenTissue 00032 00033 //OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_UTIL_POLYMESH_COMPUTE_EDGE_FACE_VORONOI_PLANE_H 00034 #endif