/usr/share/pyshared/glitch/limbo/lines.py is in python-glitch 0.6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | "Line drawing."
import OpenGL.GL as gl
import glitch
class Lines(glitch.Node):
def __init__(self, vs, **kw):
glitch.Node.__init__(self, **kw)
self.vs = vs
def draw(self, ctx):
gl.glBegin(gl.GL_LINES)
for (x, y, z) in self.vs:
gl.glVertex(x, y, z)
gl.glEnd()
class LineStrip(glitch.Node):
def __init__(self, vs, **kw):
glitch.Node.__init__(self, **kw)
self.vs = vs
def draw(self, ctx):
gl.glBegin(gl.GL_LINE_STRIP)
for (x, y, z) in self.vs:
gl.glVertex(x, y, z)
gl.glEnd()
|