00001 #ifndef OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_UTIL_POLYMESH_IS_SHARED_EDGE_H 00002 #define OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_UTIL_POLYMESH_IS_SHARED_EDGE_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_is_neighbor.h> 00013 00014 namespace OpenTissue 00015 { 00016 namespace polymesh 00017 { 00018 00019 template<typename mesh_type> 00020 bool is_shared_edge(PolyMeshEdge<mesh_type> const & e,PolyMeshFace<mesh_type> const & f0,PolyMeshFace<mesh_type> const & f1) 00021 { 00022 if(is_neighbor(f0,e) && is_neighbor(f1,e)) 00023 return true; 00024 return false; 00025 } 00026 00027 template<typename mesh_type> 00028 bool is_shared_edge(PolyMeshHalfEdge<mesh_type> const & h,PolyMeshFace<mesh_type> const & f0,PolyMeshFace<mesh_type> const & f1) 00029 { 00030 typedef typename mesh_type::edge_iterator edge_iterator; 00031 edge_iterator e = h.get_edge_iterator(); 00032 return is_shared_edge(*e,f0,f1); 00033 } 00034 00035 } // namespace polymesh 00036 } // namespace OpenTissue 00037 00038 //OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_UTIL_POLYMESH_IS_SHARED_EDGE_H 00039 #endif