00001 00002 // GL_IndexedLineSet.h // 00004 00005 #ifndef GLINDEXEDLINESET_H 00006 #define GLINDEXEDLINESET_H 00007 00008 #include "GL_X3DGeometryNode.h" 00009 00010 #include <vector> 00011 00012 namespace X3DTK { 00013 namespace GL { 00014 00017 00018 class IndexedLineSet : public X3DGeometryNode 00019 { 00020 public: 00022 IndexedLineSet(); 00024 virtual SFNode clone() const; 00026 virtual ~IndexedLineSet(); 00027 00029 void setLineWidth(const SFFloat &lineWidth); 00031 void setVerticesDuplicated(const SFBool &verticesDuplicated); 00033 void setColor(const SFBool &color); 00034 00036 void setC4UB_V3F_vertexArray(const std::vector<C4UB_V3F> &C4UB_V3F_vertexArray); 00038 void setV3F_vertexArray(const std::vector<SFVec3f> &V3F_vertexArray); 00040 void setIndexArrayArray(const std::vector<MFInt32> &indexArrayArray); 00041 00043 inline const SFFloat &getLineWidth() const {return _lineWidth;}; 00045 inline const SFBool &getVerticesDuplicated() const {return _verticesDuplicated;}; 00047 inline const SFBool &getColor() const {return _color;}; 00048 00050 inline std::vector<C4UB_V3F> &C4UB_V3F_vertexArray() {return _C4UB_V3F_vertexArray;}; 00052 inline std::vector<SFVec3f> &V3F_vertexArray() {return _V3F_vertexArray;}; 00054 inline std::vector<MFInt32> &indexArrayArray() {return _indexArrayArray;}; 00055 00057 virtual void update(); 00059 virtual void draw() const; 00060 00061 protected: 00063 IndexedLineSet(const IndexedLineSet &I); 00064 00066 SFFloat _lineWidth; 00068 SFBool _verticesDuplicated; 00070 SFBool _color; 00072 std::vector<C4UB_V3F> _C4UB_V3F_vertexArray; 00074 std::vector<SFVec3f> _V3F_vertexArray; 00076 std::vector<MFInt32> _indexArrayArray; 00077 }; 00078 00079 } 00080 } 00081 00082 #endif