diff --git a/lib/python/vismach.py b/lib/python/vismach.py index 95648aefab6..096db72c89d 100644 --- a/lib/python/vismach.py +++ b/lib/python/vismach.py @@ -480,8 +480,8 @@ def __init__(self, comp, ox, oy, oz, xx, xy, xz, zx, zy, zz, stretch, r=5): def draw_vector(self, color): - gluCylinder(self.q, self.r, self.r, 50*self.stretch, 32, 1) glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color) + gluCylinder(self.q, self.r, self.r, 50*self.stretch, 32, 1) def cross(self, a, b): return [a[1]*b[2]-a[2]*b[1], a[2]*b[0]-a[0]*b[2], a[0]*b[1]-a[1]*b[0]] @@ -511,11 +511,13 @@ def draw(self): glPushMatrix() glMultMatrixf(m_t) - self.draw_vector([1,0,0,1]) + glPushAttrib(GL_LIGHTING_BIT) + self.draw_vector([0,0,1,1]) # Z axis glRotate(90,0,1,0) - self.draw_vector([0,1,0,1]) + self.draw_vector([1,0,0,1]) # X axis glRotate(-90,1,0,0) - self.draw_vector([0,0,1,1]) + self.draw_vector([0,1,0,1]) # Y axis + glPopAttrib() def unapply(self): glPopMatrix()