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

OSGEdgeIterator.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 
00040 #ifndef _OSGEDGEITERATOR_H_
00041 #define _OSGEDGEITERATOR_H_
00042 #ifdef __sgi
00043 #pragma once
00044 #endif
00045 
00046 #include <OSGBaseTypes.h>
00047 #include <OSGFieldContainerPtr.h>
00048 #include <OSGNodePtr.h>
00049 #include <OSGNodeCore.h>
00050 #include <OSGSystemDef.h>
00051 #include <OSGGeoProperty.h>
00052 #include <OSGPrimitiveIterator.h>
00053 
00054 OSG_BEGIN_NAMESPACE
00055 
00060 class OSG_SYSTEMLIB_DLLMAPPING EdgeIterator : public PrimitiveIterator
00061 {
00062     /*==========================  PUBLIC  =================================*/    
00063   public:
00064 
00065     /*---------------------------------------------------------------------*/
00069     static const char *getClassname(void) { return "EdgeIterator"; }
00070 
00072     /*---------------------------------------------------------------------*/
00076     EdgeIterator(void);
00077     EdgeIterator(const EdgeIterator &source);
00078     EdgeIterator(const GeometryPtr& geo);
00079     EdgeIterator(const NodePtr& geo);
00080 
00082     /*---------------------------------------------------------------------*/
00086     virtual ~EdgeIterator(void);
00087 
00089     /*---------------------------------------------------------------------*/
00093     inline Int32        getIndex                (void       ) const;
00094     inline UInt32       getLength               (void       ) const;
00095     
00096     inline Int32        getPositionIndex        (Int32 which) const;
00097     inline Pnt3f        getPosition             (Int32 which) const;
00098 
00099     inline Int32        getNormalIndex          (Int32 which) const;
00100     inline Vec3f        getNormal               (Int32 which) const;
00101 
00102     inline Int32        getColorIndex           (Int32 which) const;
00103     inline Color3f      getColor                (Int32 which) const;
00104 
00105     inline Int32        getSecondaryColorIndex  (Int32 which) const;
00106     inline Color3f      getSecondaryColor       (Int32 which) const;
00107 
00108     inline Int32        getTexCoordsIndex       (Int32 which) const;
00109     inline Vec2f        getTexCoords            (Int32 which) const;
00110     inline Int32        getTexCoordsIndex1      (Int32 which) const;
00111     inline Vec2f        getTexCoords1           (Int32 which) const;
00112     inline Int32        getTexCoordsIndex2      (Int32 which) const;
00113     inline Vec2f        getTexCoords2           (Int32 which) const;
00114     inline Int32        getTexCoordsIndex3      (Int32 which) const;
00115     inline Vec2f        getTexCoords3           (Int32 which) const;
00116 
00117     inline Int32        getIndexIndex           (Int32 which) const;
00118 
00120     /*---------------------------------------------------------------------*/
00124     void           seek        (Int32 index);    
00125     void           operator ++ (void);
00126     EdgeIterator & operator =  (const EdgeIterator &source);
00127     bool           operator <  (const EdgeIterator &other) const;
00128     bool           operator == (const EdgeIterator &other) const;
00129     bool           operator != (const EdgeIterator &other) const;
00130     
00132     /*---------------------------------------------------------------------*/
00136     void setToBegin(void);
00137     void setToEnd  (void);
00138 
00141     /*=========================  PROTECTED  ===============================*/
00142   protected:
00143 
00144     typedef PrimitiveIterator Inherited;
00145           
00146    /*==========================  PRIVATE  ================================*/    
00147   private:
00148     static char cvsid[];
00149   
00150     Int32             _edgeIndex;
00151     UInt32            _actPrimIndex;
00152     Int32             _edgePntIndex[2];
00153     
00154     void startPrim(void);
00155 };
00156 
00157 typedef EdgeIterator *EdgeIteratorP;
00158 
00159 OSG_END_NAMESPACE
00160 
00161 #include "OSGEdgeIterator.inl"
00162 
00163 #endif /* _OSGTRIANGLEITERATOR_H_ */

Generated on Thu Aug 25 04:04:37 2005 for OpenSG by  doxygen 1.4.3