00001 //============================================================================= 00002 // 00003 // OpenMesh 00004 // Copyright (C) 2003 by Computer Graphics Group, RWTH Aachen 00005 // www.openmesh.org 00006 // 00007 //----------------------------------------------------------------------------- 00008 // 00009 // License 00010 // 00011 // This library is free software; you can redistribute it and/or modify it 00012 // under the terms of the GNU Lesser General Public License as published 00013 // by the Free Software Foundation, version 2.1. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00023 // 00024 //----------------------------------------------------------------------------- 00025 // 00026 // $Revision: 1801 $ 00027 // $Date: 2008-05-19 11:53:56 +0200 (Mon, 19 May 2008) $ 00028 // 00029 //============================================================================= 00030 00031 #ifndef OPENMESH_ARRAY_ITEMS_HH 00032 #define OPENMESH_ARRAY_ITEMS_HH 00033 00034 00035 //== INCLUDES ================================================================= 00036 00037 00038 #include <OpenMesh/Core/System/config.h> 00039 #include <OpenMesh/Core/Utils/GenProg.hh> 00040 #include <OpenMesh/Core/Mesh/Handles.hh> 00041 00042 00043 //== NAMESPACES =============================================================== 00044 00045 namespace OpenMesh { 00046 00047 00048 //== CLASS DEFINITION ========================================================= 00049 00050 00052 struct ArrayItems 00053 { 00054 00055 //------------------------------------------------------ internal vertex type 00056 00058 class Vertex 00059 { 00060 friend class ArrayKernel; 00061 HalfedgeHandle halfedge_handle_; 00062 }; 00063 00064 00065 //---------------------------------------------------- internal halfedge type 00066 00067 #ifndef DOXY_IGNORE_THIS 00068 class Halfedge_without_prev 00069 { 00070 friend class ArrayKernel; 00071 FaceHandle face_handle_; 00072 VertexHandle vertex_handle_; 00073 HalfedgeHandle next_halfedge_handle_; 00074 }; 00075 #endif 00076 00077 #ifndef DOXY_IGNORE_THIS 00078 class Halfedge_with_prev : public Halfedge_without_prev 00079 { 00080 friend class ArrayKernel; 00081 HalfedgeHandle prev_halfedge_handle_; 00082 }; 00083 #endif 00084 00085 //TODO: should be selected with config.h define 00086 typedef Halfedge_with_prev Halfedge; 00087 typedef GenProg::Bool2Type<true> HasPrevHalfedge; 00088 00089 //-------------------------------------------------------- internal edge type 00090 #ifndef DOXY_IGNORE_THIS 00091 class Edge 00092 { 00093 friend class ArrayKernel; 00094 Halfedge halfedges_[2]; 00095 }; 00096 #endif 00097 00098 //-------------------------------------------------------- internal face type 00099 #ifndef DOXY_IGNORE_THIS 00100 class Face 00101 { 00102 friend class ArrayKernel; 00103 HalfedgeHandle halfedge_handle_; 00104 }; 00105 }; 00106 #endif 00107 00108 //============================================================================= 00109 } // namespace OpenMesh 00110 //============================================================================= 00111 #endif // OPENMESH_ITEMS_HH defined 00112 //=============================================================================