00001 00002 // X3D_IndexedLineSet.h // 00004 00005 #ifndef INDEXEDLINESET_H 00006 #define INDEXEDLINESET_H 00007 00008 #include "X3DTypes.h" 00009 #include "X3D_X3DGeometryNode.h" 00010 00011 namespace X3DTK { 00012 namespace X3D { 00013 00014 class X3DColorNode; 00015 class X3DCoordinateNode; 00016 00021 00022 class IndexedLineSet : public X3DGeometryNode 00023 { 00024 public: 00026 IndexedLineSet(); 00028 IndexedLineSet(X3DColorNode *color, 00029 X3DCoordinateNode *coord, 00030 const MFInt32 &colorIndex, 00031 const SFBool &colorPerVertex, 00032 const MFInt32 &coordIndex, 00033 const SFFloat &lineWidth); 00035 virtual SFAbstractNode clone() const; 00037 virtual ~IndexedLineSet(); 00038 00040 void setColor(X3DColorNode *color); 00042 void setCoord(X3DCoordinateNode *coord); 00044 void setColorIndex(const MFInt32 &colorIndex); 00046 void setColorPerVertex(const SFBool &colorPerVertex); 00048 void setCoordIndex(const MFInt32 &coordIndex); 00050 void setLineWidth(const SFFloat &lineWidth); 00051 00053 inline SFNode getColor() const {return _color;}; 00055 inline SFNode getCoord() const {return _coord;}; 00057 inline const MFInt32 &getColorIndex() const {return _colorIndex;}; 00059 inline const SFBool &getColorPerVertex() const {return _colorPerVertex;}; 00061 inline const MFInt32 &getCoordIndex() const {return _coordIndex;}; 00063 inline const SFFloat &getLineWidth() const {return _lineWidth;}; 00064 00066 virtual MFAbstractNode getChildrenList() const; 00067 00070 virtual bool addChild(const SFAbstractNode &N); 00073 virtual bool setChild(const SFAbstractNode &N); 00075 virtual bool removeChild(const SFAbstractNode &N); 00076 00078 virtual void load(const X3DFileElement *element); 00080 virtual SFString &write(SFString &output) const; 00081 00082 protected: 00084 IndexedLineSet(const IndexedLineSet &I); 00085 00086 private: 00088 SFNode _color; 00090 SFNode _coord; 00092 MFInt32 _colorIndex; 00094 SFBool _colorPerVertex; 00096 MFInt32 _coordIndex; 00098 SFFloat _lineWidth; 00099 }; 00100 00101 } 00102 } 00103 00104 #endif