00001 #ifndef OPENTISSUE_CORE_CONTAINERS_MESH_TRIMESH_UTIL_TRIMESH_VALENCY_H 00002 #define OPENTISSUE_CORE_CONTAINERS_MESH_TRIMESH_UTIL_TRIMESH_VALENCY_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/trimesh/trimesh_vertex.h> 00013 #include <OpenTissue/core/containers/mesh/trimesh/trimesh_face.h> 00014 00015 namespace OpenTissue 00016 { 00017 namespace trimesh 00018 { 00019 00020 template<typename mesh_type> 00021 unsigned int valency(TriMeshVertex<mesh_type> const & v) 00022 { 00023 return v.get_face_count(); 00024 } 00025 00026 template<typename mesh_type> 00027 unsigned int valency(TriMeshFace<mesh_type> const & /*f*/) 00028 { 00029 return 3u; 00030 } 00031 00032 } // namespace trimesh 00033 } // namespace OpenTissue 00034 00035 //OPENTISSUE_CORE_CONTAINERS_MESH_TRIMESH_UTIL_TRIMESH_VALENCY_H 00036 #endif