renders the item to the screen
(self)
| 19 | self.selected = False |
| 20 | |
| 21 | def render(self): |
| 22 | """ renders the item to the screen """ |
| 23 | glPushMatrix() |
| 24 | glMultMatrixf(numpy.transpose(self.translation_matrix)) |
| 25 | glMultMatrixf(self.scaling_matrix) |
| 26 | cur_color = color.COLORS[self.color_index] |
| 27 | glColor3f(cur_color[0], cur_color[1], cur_color[2]) |
| 28 | if self.selected: # emit light if the node is selected |
| 29 | glMaterialfv(GL_FRONT, GL_EMISSION, [0.3, 0.3, 0.3]) |
| 30 | |
| 31 | self.render_self() |
| 32 | if self.selected: |
| 33 | glMaterialfv(GL_FRONT, GL_EMISSION, [0.0, 0.0, 0.0]) |
| 34 | |
| 35 | glPopMatrix() |
| 36 | |
| 37 | def render_self(self): |
| 38 | raise NotImplementedError("The Abstract Node Class doesn't define 'render_self'") |
no test coverage detected