00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef opengl_CSetOfLines_H
00030 #define opengl_CSetOfLines_H
00031
00032 #include <mrpt/opengl/CRenderizable.h>
00033
00034 namespace mrpt
00035 {
00036 namespace opengl
00037 {
00038 class MRPTDLLIMPEXP CSetOfLines;
00039
00040
00041 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE( CSetOfLines, CRenderizable )
00042
00043
00046 class MRPTDLLIMPEXP CSetOfLines : public CRenderizable
00047 {
00048 DEFINE_SERIALIZABLE( CSetOfLines )
00049 protected:
00050 vector_float m_x0,m_y0,m_z0;
00051 vector_float m_x1,m_y1,m_z1;
00052 float m_lineWidth;
00053
00054 public:
00055 void clear();
00057 void setLineWidth(float w) { m_lineWidth=w; }
00058 float getLineWidth() const { return m_lineWidth; }
00059
00060 void appendLine(
00061 const float &x0,const float &y0, const float &z0,
00062 const float &x1,const float &y1, const float &z1 );
00063
00064 void resize(const size_t &nLines);
00065
00066 void setLineByIndex(
00067 const size_t &index,
00068 const float &x0,const float &y0, const float &z0,
00069 const float &x1,const float &y1, const float &z1 );
00070
00072 static CSetOfLinesPtr Create()
00073 {
00074 return CSetOfLinesPtr( new CSetOfLines() );
00075 }
00076
00079 void render();
00080
00081 private:
00084 CSetOfLines( ) :
00085 m_x0(),m_y0(),m_z0(),
00086 m_x1(),m_y1(),m_z1(),
00087 m_lineWidth(1.0f)
00088 {
00089 }
00091 virtual ~CSetOfLines() { }
00092 };
00093
00094 }
00095
00096 }
00097
00098
00099 #endif