00001 #ifndef OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_POLYMESH_FACE_H 00002 #define OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_POLYMESH_FACE_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 namespace OpenTissue 00013 { 00014 namespace polymesh 00015 { 00016 00017 template<typename polymesh_type_ > 00018 class PolyMeshFace : public polymesh_type_::face_traits 00019 { 00020 public: 00021 00022 typedef polymesh_type_ mesh_type; 00023 typedef typename mesh_type::halfedge_handle halfedge_handle; 00024 typedef typename mesh_type::face_handle face_handle; 00025 typedef typename mesh_type::halfedge_iterator halfedge_iterator; 00026 00027 private: 00028 00029 face_handle m_self; 00030 mesh_type * m_owner; 00031 halfedge_handle m_border_halfedge; 00032 00033 public: 00034 00035 PolyMeshFace() 00036 : m_self() 00037 , m_owner(0) 00038 , m_border_halfedge() 00039 {} 00040 00041 public: 00042 00043 face_handle get_handle() const { return m_self; } 00044 mesh_type * get_owner() const { return m_owner; } 00045 halfedge_handle get_border_halfedge_handle() const { return m_border_halfedge; } 00046 halfedge_iterator get_border_halfedge_iterator() const { return m_owner->get_halfedge_iterator(m_border_halfedge); } 00047 00048 private: 00049 00050 friend class polymesh_core_access; 00051 void set_handle(face_handle f) { m_self = f; } 00052 void set_owner(mesh_type * owner) { m_owner = owner; } 00053 void set_border_halfedge_handle(halfedge_handle h) { m_border_halfedge = h; } 00054 00055 }; 00056 00057 } // namespace polymesh 00058 } // namespace OpenTissue 00059 00060 //OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_POLYMESH_FACE_H 00061 #endif