10 Axis(QString label
= "axis", QColor color
= QColor(0, 255, 0), bool hasLabel
= false,
11 bool isVisible
= true, bool isLocal
= false)
15 m_hasLabel
= hasLabel
;
16 m_isVisible
= isVisible
;
22 void setColor(QColor color
) { m_color
= color
; }
23 void setLabel(QString label
) { m_label
= label
; }
24 void setVisible(bool isVisible
) { m_isVisible
= isVisible
; }
25 void setLocal(bool isLocal
) { m_isLocal
= isLocal
; }
28 const QColor
*getColor(void) const { return &m_color
; }
29 QString
getLabel(void) const {return m_label
; }
30 bool hasLabel(void) const { return m_hasLabel
; }
31 bool isVisible(void) const { return m_isVisible
; }
32 bool isLocal(void) const { return m_isLocal
; }
35 void draw(float x0
, float y0
, float z0
, float x1
, float y1
, float z1
) const
40 // XXX: should be tunable
42 glEnable(GL_LINE_SMOOTH
);
45 glColor3f(m_color
.redF(), m_color
.greenF(), m_color
.blueF());
46 glVertex3f(x0
, y0
, z0
);
47 glVertex3f(x1
, y1
, z1
);
50 // Restore color and line width
51 glColor3f(1.0f
, 1.0f
, 1.0f
);
52 glDisable(GL_LINE_SMOOTH
);