00001 #ifndef OPENTISSUE_CORE_CONTAINERS_MESH_TRIMESH_UTIL_TRIMESH_FACE_FLIP_H 00002 #define OPENTISSUE_CORE_CONTAINERS_MESH_TRIMESH_UTIL_TRIMESH_FACE_FLIP_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_face.h> 00013 00014 namespace OpenTissue 00015 { 00016 namespace trimesh 00017 { 00018 00019 template<typename mesh_type> 00020 bool face_flip(TriMeshFace<mesh_type> const & f) 00021 { 00022 typedef typename TriMeshFace<mesh_type>::vertex_handle vertex_handle; 00023 vertex_handle h0 = f.get_vertex0_handle(); 00024 vertex_handle h1 = f.get_vertex1_handle(); 00025 //vertex_handle h2 = f.get_vertex2_handle(); 00026 trimesh_core_access::set_vertex0_handle( &f, h1 ); 00027 trimesh_core_access::set_vertex1_handle( &f, h0 ); 00028 //trimesh_core_access::set_vertex2_handle( &f, h2 ); 00029 return true; 00030 } 00031 00032 } // namespace trimesh 00033 } // namespace OpenTissue 00034 00035 //OPENTISSUE_CORE_CONTAINERS_MESH_TRIMESH_UTIL_TRIMESH_FACE_FLIP_H 00036 #endif