IvfFaceSet.h

00001 //
00002 // Copyright 1999-2006 by Structural Mechanics, Lund University.
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Library General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Library General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Library General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00017 // USA.
00018 //
00019 // Please report all bugs and problems to "ivf@byggmek.lth.se".
00020 //
00021 //
00022 // Written by Jonas Lindemann
00023 //
00024 
00025 #ifndef IVFFACESET_H
00026 #define IVFFACESET_H
00027 
00028 #include <ivf/IvfShape.h>
00029 
00030 // Obsolete use CIvfTriSet, CIvfQuadSet or CIvfPolySet instead.
00031 
00032 IvfSmartPointer(CIvfFaceSet);
00033 
00034 class IVF_API CIvfFaceSet : public CIvfShape {
00035 public:
00036         CIvfFaceSet();
00037 
00038         virtual ~CIvfFaceSet();
00039 
00040         IvfClassInfo("CIvfFaceSet",CIvfShape);
00041 
00042         void setCoordSize(long coordSize);
00043         long getCoordSize();
00044 
00045         void setCoord(long n, double x, double y, double z);
00046         void getCoord(long n, double &x, double &y, double &z);
00047 
00048         void setColor(long n, float r, float g, float b);
00049         void getColor(long n, float &r, float &g, float &b);
00050 
00051         void setCoordIndexSize(long indexSize);
00052         long getCoordIndexSize();
00053 
00054         void setTextureCoordSize(long size);
00055         long getTextureCoordSize();
00056 
00057         void setCoordIndex(long n, long i1, long i2, long i3, long i4);
00058         void getCoordIndex(long n, long &i1, long &i2, long &i3, long &i4);
00059 
00060         void setTextureCoord(long n, double s, double t);
00061         void getTextureCoord(long n, double &s, double &t);
00062 
00063         void setTextureCoordIndex(long n, long i1, long i2, long i3, long i4);
00064         void getTextureCoordIndex(long n, long &i1, long &i2, long &i3, long &i4);
00065 
00066         void setUseColor(bool flag);
00067         bool getUseColor();
00068 
00069         void setUseTexture(bool flag);
00070         bool getUseTexture();
00071 
00072 
00073 protected:
00074         virtual void createGeometry();
00075 private:
00076         long m_nCoordIndex;
00077         long m_nFaces;
00078         long m_nCoords;
00079         long m_nTextureCoords;
00080         double (*m_coords)[3];
00081         double (*m_textureCoords)[2];
00082         float (*m_colors)[3];
00083         double (*m_normals)[3];
00084         long (*m_coordIndex)[4];
00085         long (*m_textureCoordIndex)[4];
00086         bool m_useColor;
00087         bool m_useTexture;
00088 };
00089 
00090 #endif

Generated on Fri Sep 1 15:36:45 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO