00001
00002
00004
00005 #ifndef INDEXEDFACESET_H
00006 #define INDEXEDFACESET_H
00007
00008 #include "X3DTypes.h"
00009 #include "X3DComposedGeometryNode.h"
00010
00011 namespace X3DTK {
00012 namespace X3D {
00013
00018
00019 class IndexedFaceSet : public X3DComposedGeometryNode
00020 {
00021 public:
00023 IndexedFaceSet();
00025 IndexedFaceSet(const X3DColorNode *color,
00026 const X3DCoordinateNode *coord,
00027 const X3DNormalNode *normal,
00028 const X3DTextureCoordinateNode *texCoord,
00029 SFBool ccw,
00030 const MFInt32 &colorIndex,
00031 SFBool colorPerVertex,
00032 SFBool convex,
00033 const MFInt32 &coordIndex,
00034 SFFloat creaseAngle,
00035 const MFInt32 &normalIndex,
00036 SFBool normalPerVertex,
00037 SFBool solid,
00038 const MFInt32 &texCoordIndex);
00040 virtual SFNode clone() const;
00042 virtual ~IndexedFaceSet();
00043
00045 void setColorIndex(const MFInt32 &colorIndex);
00047 void setConvex(SFBool convex);
00049 void setCoordIndex(const MFInt32 &coordIndex);
00051 void setCreaseAngle(SFFloat creaseAngle);
00053 void setNormalIndex(const MFInt32 &normalIndex);
00055 void setTexCoordIndex(const MFInt32 &texCoordIndex);
00056
00058 inline const MFInt32 &getColorIndex() const {return _colorIndex;};
00060 inline SFBool getConvex() const {return _convex;};
00062 inline const MFInt32 &getCoordIndex() const {return _coordIndex;};
00064 inline SFFloat getCreaseAngle() const {return _creaseAngle;};
00066 inline const MFInt32 &getNormalIndex() const {return _normalIndex;};
00068 inline const MFInt32 &getTexCoordIndex() const {return _texCoordIndex;};
00069
00071 virtual void load(const X3DFileElement *element);
00073 virtual SFString write() const;
00074
00075 protected:
00077 IndexedFaceSet(const IndexedFaceSet &G);
00078
00079 private:
00081 MFInt32 _colorIndex;
00083 SFBool _convex;
00085 MFInt32 _coordIndex;
00087 SFFloat _creaseAngle;
00089 MFInt32 _normalIndex;
00091 MFInt32 _texCoordIndex;
00092 };
00093
00094 }
00095 }
00096
00097 #endif