00001 #ifndef X3DTK_X3D_INDEXEDLINESET_H 00002 #define X3DTK_X3D_INDEXEDLINESET_H 00003 00004 #include "X3DTypes.h" 00005 #include "X3D_X3DGeometryNode.h" 00006 00007 namespace X3DTK { 00008 namespace X3D { 00009 00010 class X3DColorNode; 00011 class X3DCoordinateNode; 00012 00021 class IndexedLineSet : public X3DGeometryNode 00022 { 00023 public: 00025 IndexedLineSet(); 00027 IndexedLineSet(X3DColorNode *color, 00028 X3DCoordinateNode *coord, 00029 const MFInt32 &colorIndex, 00030 const SFBool &colorPerVertex, 00031 const MFInt32 &coordIndex, 00032 const SFFloat &lineWidth); 00034 virtual SFAbstractNode clone() const; 00036 virtual ~IndexedLineSet(); 00037 00039 void setColor(X3DColorNode *color); 00041 void setCoord(X3DCoordinateNode *coord); 00043 void setColorIndex(const MFInt32 &colorIndex); 00045 void setColorPerVertex(const SFBool &colorPerVertex); 00047 void setCoordIndex(const MFInt32 &coordIndex); 00049 void setLineWidth(const SFFloat &lineWidth); 00050 00052 inline SFNode getColor() const {return _color;}; 00054 inline SFNode getCoord() const {return _coord;}; 00056 inline const MFInt32 &getColorIndex() const {return _colorIndex;}; 00058 inline const SFBool &getColorPerVertex() const {return _colorPerVertex;}; 00060 inline const MFInt32 &getCoordIndex() const {return _coordIndex;}; 00062 inline const SFFloat &getLineWidth() const {return _lineWidth;}; 00063 00065 virtual MFAbstractNode getChildList() const; 00066 00069 virtual bool addChild(const SFAbstractNode &N); 00072 virtual bool setChild(const SFAbstractNode &N); 00074 virtual bool removeChild(const SFAbstractNode &N); 00075 00077 virtual void load(const X3DFileElement *element); 00079 virtual SFString &write(SFString &output) const; 00080 00081 protected: 00083 IndexedLineSet(const IndexedLineSet &I); 00084 00085 private: 00087 SFNode _color; 00089 SFNode _coord; 00091 MFInt32 _colorIndex; 00093 SFBool _colorPerVertex; 00095 MFInt32 _coordIndex; 00097 SFFloat _lineWidth; 00098 }; 00099 00100 } 00101 } 00102 00103 #endif