00001 #ifndef OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_CIRCULATORS_POLYMESH_VERTEX_EDGE_CIRCULATOR_H 00002 #define OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_CIRCULATORS_POLYMESH_VERTEX_EDGE_CIRCULATOR_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/circulators/polymesh_vertex_halfedge_circulator.h> 00013 00014 namespace OpenTissue 00015 { 00016 namespace polymesh 00017 { 00018 00019 00034 template< 00035 typename PolyMesh, 00036 class Value 00037 > 00038 class PolyMeshVertexEdgeCirculator 00039 { 00040 protected: 00041 00042 typename PolyMesh::vertex_halfedge_circulator m_circ; 00043 00044 public: 00045 00046 PolyMeshVertexEdgeCirculator() 00047 : m_circ() 00048 {} 00049 00050 explicit PolyMeshVertexEdgeCirculator( typename PolyMesh::vertex_type const & v) 00051 : m_circ(v) 00052 {} 00053 00054 template <class OtherValue> 00055 PolyMeshVertexEdgeCirculator( 00056 PolyMeshVertexEdgeCirculator<PolyMesh,OtherValue> const& other 00057 ) 00058 : m_circ( other.m_circ ) 00059 {} 00060 00061 public: 00062 00063 template <class OtherValue> 00064 bool operator==(PolyMeshVertexEdgeCirculator<PolyMesh,OtherValue> const& other) const 00065 { 00066 return (m_circ == other.m_circ); 00067 } 00068 00069 template <class OtherValue> 00070 bool operator!=(PolyMeshVertexEdgeCirculator<PolyMesh,OtherValue> const& other) const 00071 { 00072 return (m_circ != other.m_circ); 00073 } 00074 00075 PolyMeshVertexEdgeCirculator & operator++() 00076 { 00077 ++m_circ; 00078 return *this; 00079 } 00080 00081 PolyMeshVertexEdgeCirculator & operator--() 00082 { 00083 --m_circ; 00084 return *this; 00085 } 00086 00087 public: 00088 00089 Value & operator*() const { return *(m_circ->get_edge_iterator()); } 00090 00091 Value * operator->() const { return &(*(m_circ->get_edge_iterator())); } 00092 00093 }; 00094 00095 } // namespace polymesh 00096 } // namespace OpenTissue 00097 00098 //OPENTISSUE_CORE_CONTAINERS_MESH_POLYMESH_CIRCULATORS_POLYMESH_VERTEX_EDGE_CIRCULATOR_H 00099 #endif