27 #define GLMultMatrix glMultMatrixf
48 GLMultMatrix(&
tm[0][0]);
51 glPushAttrib(GL_LIGHTING_BIT);
52 glDisable(GL_LIGHTING);
56 GLUquadricObj *pObj = gluNewQuadric();
57 gluDisk(pObj, 0.0f, m_radius, 20, 1);
58 gluDeleteQuadric(pObj);
68 m_arrowLength(arrowLength),
69 m_arrowTailWidth(arrowTailWidth),
70 m_arrowHeadWidth(arrowHeadWidth),
71 m_arrowTailPortion(
max(
min(arrowTailPortion, 1.0), 0.0))
84 GLMultMatrix(&
tm[0][0]);
87 glPushAttrib(GL_LIGHTING_BIT);
88 glDisable(GL_LIGHTING);
92 const real tailLength = m_arrowLength * m_arrowTailPortion;
94 glNormal3f(0.0, 0.0, 1.0);
95 glVertex3f(0.0, -m_arrowTailWidth / 2.0, 0.0);
96 glVertex3f(0.0, m_arrowTailWidth / 2.0, 0.0);
97 glVertex3f(tailLength, m_arrowTailWidth / 2.0, 0.0);
98 glVertex3f(tailLength, -m_arrowTailWidth / 2.0, 0.0);
102 glBegin(GL_TRIANGLES);
103 glNormal3f(0.0, 0.0, 1.0);
104 glVertex3f(tailLength, -m_arrowHeadWidth / 2.0, 0.0);
105 glVertex3f(tailLength, m_arrowHeadWidth / 2.0, 0.0);
106 glVertex3f(m_arrowLength, 0.0, 0.0);