00001 00002 00003 00005 00006 00011 00016 00022 00024 00025 00030 00035 00040 // IndexedLineSet.h // 00042 00043 #ifndef INDEXEDLINESET_H 00044 #define INDEXEDLINESET_H 00045 00046 #include "X3DTypes.h" 00047 #include "X3DGeometryNode.h" 00048 00049 namespace X3DTK { 00050 namespace X3D { 00051 00052 class X3DColorNode; 00053 class X3DCoordinateNode; 00054 00059 00060 class IndexedLineSet : public X3DGeometryNode 00061 { 00062 public: 00064 IndexedLineSet(); 00066 IndexedLineSet(const X3DColorNode *color, 00067 const X3DCoordinateNode *coord, 00068 const MFInt32 &colorIndex, 00069 SFBool colorPerVertex, 00070 const MFInt32 &coordIndex, 00071 SFFloat lineWidth); 00073 virtual SFNode clone() const; 00075 virtual ~IndexedLineSet(); 00076 00078 void setColor(const X3DColorNode *color); 00080 void setCoord(const X3DCoordinateNode *coord); 00082 void setColorIndex(const MFInt32 &colorIndex); 00084 void setColorPerVertex(SFBool colorPerVertex); 00086 void setCoordIndex(const MFInt32 &coordIndex); 00088 void setLineWidth(SFFloat lineWidth); 00089 00091 inline SFNode getColor() const {return _color;}; 00093 inline SFNode getCoord() const {return _coord;}; 00095 inline const MFInt32 &getColorIndex() const {return _colorIndex;}; 00097 inline SFBool getColorPerVertex() const {return _colorPerVertex;}; 00099 inline const MFInt32 &getCoordIndex() const {return _coordIndex;}; 00101 inline SFFloat getLineWidth() const {return _lineWidth;}; 00102 00105 virtual bool addChild(const SFAbstractNode &N); 00108 virtual bool setChild(const SFAbstractNode &N); 00110 virtual bool removeChild(const SFAbstractNode &N); 00111 00113 virtual void load(const X3DFileElement *element); 00115 virtual SFString write() const; 00116 00117 protected: 00119 IndexedLineSet(const IndexedLineSet &I); 00120 00121 private: 00123 SFNode _color; 00125 SFNode _coord; 00127 MFInt32 _colorIndex; 00129 SFBool _colorPerVertex; 00131 MFInt32 _coordIndex; 00133 SFFloat _lineWidth; 00134 }; 00135 00136 } 00137 } 00138 00139 #endif