Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

GeometryIterator.h

Go to the documentation of this file.
00001 
00002 /*
00003     TEDDY - General graphics application library
00004     Copyright (C) 1999-2002  Timo Suoranta
00005     tksuoran@cc.helsinki.fi
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; either
00010     version 2.1 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 
00021     $Id:  $
00022 */
00023 
00024 
00025 #ifndef TEDDY__MODELS__GEOMETRY_ITERATOR__H
00026 #define TEDDY__MODELS__GEOMETRY_ITERATOR__H
00027 
00028 
00029 #if 0
00030 #include "Teddy/Models/Geometry.h"
00031 #if 0
00032 # include "Teddy/Bsp/CSG_BooleanOps.h"
00033 #endif
00034 
00035 
00036 namespace Teddy  {
00037 namespace Models {
00038 
00039 
00040 class GeometryIterator {
00041 public:
00042     GeometryIterator( Geometry *g );
00043     virtual ~GeometryIterator();
00044 
00045     //  CSG
00046     unsigned long                 countCSGFaceElements  ();
00047     unsigned long                 countCSGVertexElements();
00048     CSG_FaceIteratorDescriptor    getFaceIterator       ();
00049     CSG_VertexIteratorDescriptor  getVertexIterator     ();
00050     int                           faceDone              ();
00051     void                          faceFill              ( CSG_IFace *face );
00052     void                          faceStep              ();
00053     void                          faceReset             ();
00054     int                           vertexDone            ();
00055     void                          vertexFill            ( CSG_IVertex *vertex );
00056     void                          vertexStep            ();
00057     void                          vertexReset           ();
00058     static int                    FaceItDone            ( CSG_IteratorPtr it );
00059     static void                   FaceItFill            ( CSG_IteratorPtr it, CSG_IFace *face );
00060     static void                   FaceItStep            ( CSG_IteratorPtr it );
00061     static void                   FaceItReset           ( CSG_IteratorPtr it );
00062     static int                    VertexItDone          ( CSG_IteratorPtr it );
00063     static void                   VertexItFill          ( CSG_IteratorPtr it, CSG_IVertex *vertex );
00064     static void                   VertexItStep          ( CSG_IteratorPtr it );
00065     static void                   VertexItReset         ( CSG_IteratorPtr it );
00066 
00067 public:
00068     Geometry                 *geometry;
00069     list<Element*>::iterator  face_e_it;
00070     list<Vertex*> ::iterator  face_v_it;
00071     unsigned long             face_data;
00072     list<Element*>::iterator  vertex_e_it;
00073     list<Vertex*> ::iterator  vertex_v_it;
00074     unsigned long             vertex_data;
00075 };
00076 
00077 
00078 };  //  namespace Models
00079 };  //  namespace Teddy
00080 
00081 #endif
00082 #endif  //  TEDDY__MODELS__GEOMETRY_ITERATOR__H
00083