00001 #ifndef OPENTISSUE_CORE_CONTAINERS_MESH_COMMON_UTIL_MESH_COMPUTE_FACE_PLANE_H 00002 #define OPENTISSUE_CORE_CONTAINERS_MESH_COMMON_UTIL_MESH_COMPUTE_FACE_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_face_normal.h> 00013 #include <OpenTissue/core/containers/mesh/common/util/mesh_compute_face_center.h> 00014 00015 namespace OpenTissue 00016 { 00017 namespace mesh 00018 { 00019 00020 template<typename face_type,typename plane_type> 00021 void compute_face_plane(face_type const & f, plane_type & plane) 00022 { 00023 typedef typename face_type::mesh_type mesh_type; 00024 typedef typename mesh_type::math_types math_types; 00025 typedef typename math_types::value_traits value_traits; 00026 typedef typename math_types::vector3_type vector3_type; 00027 typedef typename math_types::real_type real_type; 00028 00029 vector3_type n,c; 00030 compute_face_center(f,c); 00031 compute_face_normal(f,n); 00032 plane.set(n,c); 00033 } 00034 00035 } // namespace mesh 00036 } // namespace OpenTissue 00037 00038 //OPENTISSUE_CORE_CONTAINERS_MESH_COMMON_UTIL_MESH_COMPUTE_FACE_PLANE_H 00039 #endif