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
00017
00018 class IndexedFaceSet : public X3DComposedGeometryNode
00019 {
00020 public:
00022 IndexedFaceSet();
00024 IndexedFaceSet(const X3DColorNode *color,
00025 const X3DCoordinateNode *coord,
00026 const X3DNormalNode *normal,
00027 const X3DTextureCoordinateNode *texCoord,
00028 SFBool ccw,
00029 const MFInt32 &colorIndex,
00030 SFBool colorPerVertex,
00031 SFBool convex,
00032 const MFInt32 &coordIndex,
00033 SFFloat creaseAngle,
00034 const MFInt32 &normalIndex,
00035 SFBool normalPerVertex,
00036 SFBool solid,
00037 const MFInt32 &texCoordIndex);
00039 virtual SFNode clone() const;
00041 ~IndexedFaceSet();
00042
00044 void setColorIndex(const MFInt32 &colorIndex);
00046 void setConvex(SFBool convex);
00048 void setCoordIndex(const MFInt32 &coordIndex);
00050 void setCreaseAngle(SFFloat creaseAngle);
00052 void setNormalIndex(const MFInt32 &normalIndex);
00054 void setTexCoordIndex(const MFInt32 &texCoordIndex);
00055
00057 MFInt32 &getColorIndex() const {return (MFInt32 &)colorIndex_;};
00059 SFBool getColorPerVertex() const {return colorPerVertex_;};
00061 SFBool getConvex() const {return convex_;};
00063 MFInt32 &getCoordIndex() const {return (MFInt32 &)coordIndex_;};
00065 SFFloat getCreaseAngle() const {return creaseAngle_;};
00067 MFInt32 &getNormalIndex() const {return (MFInt32 &)normalIndex_;};
00069 MFInt32 &getTexCoordIndex() const {return (MFInt32 &)texCoordIndex_;};
00070
00072 virtual void loadAttributes(const X3DFileElement *element);
00074 virtual SFString writeAttributes() const;
00075
00076 protected:
00078 IndexedFaceSet(const IndexedFaceSet &G);
00079
00080 private:
00081 MFInt32 colorIndex_;
00082 SFBool convex_;
00083 MFInt32 coordIndex_;
00084 SFFloat creaseAngle_;
00085 MFInt32 normalIndex_;
00086 MFInt32 texCoordIndex_;
00087 };
00088
00089 }
00090
00091 #endif