00001 #ifndef X3DTK_GL_INDEXEDLINESET_H 00002 #define X3DTK_GL_INDEXEDLINESET_H 00003 00004 #include "GL_X3DGeometryNode.h" 00005 00006 #include <vector> 00007 00008 namespace X3DTK { 00009 namespace GL { 00010 00017 class IndexedLineSet : public X3DGeometryNode 00018 { 00019 public: 00021 IndexedLineSet(); 00023 virtual SFNode clone() const; 00025 virtual ~IndexedLineSet(); 00026 00028 void setLineWidth(const SFFloat &lineWidth); 00030 void setVerticesDuplicated(const SFBool &verticesDuplicated); 00032 void setColor(const SFBool &color); 00033 00035 void setC4UB_V3F_vertexArray(const std::vector<C4UB_V3F> &C4UB_V3F_vertexArray); 00037 void setV3F_vertexArray(const std::vector<SFVec3f> &V3F_vertexArray); 00039 void setIndexArrayArray(const std::vector<MFInt32> &indexArrayArray); 00040 00042 inline const SFFloat &getLineWidth() const {return _lineWidth;}; 00044 inline const SFBool &getVerticesDuplicated() const {return _verticesDuplicated;}; 00046 inline const SFBool &getColor() const {return _color;}; 00047 00049 inline std::vector<C4UB_V3F> &C4UB_V3F_vertexArray() {return _C4UB_V3F_vertexArray;}; 00051 inline std::vector<SFVec3f> &V3F_vertexArray() {return _V3F_vertexArray;}; 00053 inline std::vector<MFInt32> &indexArrayArray() {return _indexArrayArray;}; 00054 00056 virtual void update(); 00058 virtual void draw() const; 00059 00060 protected: 00062 IndexedLineSet(const IndexedLineSet &I); 00063 00065 SFFloat _lineWidth; 00067 SFBool _verticesDuplicated; 00069 SFBool _color; 00071 std::vector<C4UB_V3F> _C4UB_V3F_vertexArray; 00073 std::vector<SFVec3f> _V3F_vertexArray; 00075 std::vector<MFInt32> _indexArrayArray; 00076 }; 00077 00078 } 00079 } 00080 00081 #endif