Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

VFront.hh

00001 /*===========================================================================*\
00002  *                                                                           *
00003  *                               OpenMesh                                    *
00004  *      Copyright (C) 2001-2005 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 Library General Public License as published   *
00013  *  by the Free Software Foundation, version 2.                              *
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  *  Library General Public License for more details.                         *
00019  *                                                                           *
00020  *  You should have received a copy of the GNU Library 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 //=============================================================================
00027 //
00028 //  CLASS newClass
00029 //
00030 //=============================================================================
00031 
00032 #ifndef OPENMESH_VDPROGMESH_VFRONT_HH
00033 #define OPENMESH_VDPROGMESH_VFRONT_HH
00034 
00035 
00036 //== INCLUDES =================================================================
00037 
00038 #include <OpenMesh/Core/System/config.hh>
00039 #include <OpenMesh/Tools/VDPM/VHierarchyNode.hh>
00040 #include <vector>
00041 
00042 
00043 //== FORWARDDECLARATIONS ======================================================
00044 
00045 
00046 //== NAMESPACES ===============================================================
00047 
00048 namespace OpenMesh {
00049 namespace VDPM {
00050 
00051 //== CLASS DEFINITION =========================================================
00052 
00053               
00057 class VFront
00058 {
00059 private:
00060 
00061   typedef VHierarchyNodeHandleList::iterator  VHierarchyNodeHandleListIter;
00062   enum VHierarchyNodeStatus { kSplit, kActive, kCollapse };
00063   
00064   VHierarchyNodeHandleList                    front_;
00065   VHierarchyNodeHandleListIter                front_it_;
00066   std::vector<VHierarchyNodeHandleListIter>   front_location_;
00067 
00068 public:
00069 
00070   VFront();
00071 
00072   void clear() { front_.clear(); front_location_.clear(); }
00073   void begin() { front_it_ = front_.begin(); }
00074   bool end()   { return (front_it_ == front_.end()) ? true : false; }
00075   void next()  { ++front_it_; }
00076   int size()   { return (int) front_.size(); }
00077   VHierarchyNodeHandle node_handle()    { return  *front_it_; }
00078 
00079   void add(VHierarchyNodeHandle _node_handle);
00080   void remove(VHierarchyNodeHandle _node_handle);
00081   bool is_active(VHierarchyNodeHandle _node_handle);
00082   void init(VHierarchyNodeHandleContainer &_roots, unsigned int _n_details);  
00083 };
00084 
00085 
00086 //=============================================================================
00087 } // namespace VDPM
00088 } // namespace OpenMesh
00089 //=============================================================================
00090 #endif // OPENMESH_VDPROGMESH_VFRONT_HH defined
00091 //=============================================================================

acg pic Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .