101 |
|
|
102 |
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 0, h = 1, key = None): |
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 0, h = 1, key = None): |
103 |
if color != None: |
if color != None: |
104 |
putnoc(vs, getDListNocoords("Color " + js(color))) |
vs.put( getDListNocoords("Color " + js(color))) |
105 |
putnoc(vs, getDListNocoords(""" |
vs.put( getDListNocoords(""" |
106 |
PushAttrib ENABLE_BIT |
PushAttrib ENABLE_BIT |
107 |
Disable ALPHA_TEST |
Disable ALPHA_TEST |
108 |
Disable DEPTH_TEST |
Disable DEPTH_TEST |
118 |
|
|
119 |
vs.map.put(t, cs) |
vs.map.put(t, cs) |
120 |
|
|
121 |
putnoc(vs, getDListNocoords(""" |
vs.put( getDListNocoords(""" |
122 |
PopAttrib |
PopAttrib |
123 |
""")) |
""")) |
124 |
|
|
132 |
def js(list): |
def js(list): |
133 |
return " ".join([str(el) for el in list]) |
return " ".join([str(el) for el in list]) |
134 |
|
|
|
def rotatelist(list): |
|
|
list.append(list.pop(0)) |
|
|
|
|
135 |
def getDList(s): |
def getDList(s): |
136 |
return GLCache.getCallListCoorded(s) |
return GLCache.getCallListCoorded(s) |
137 |
|
|
171 |
def floats(start, end, n): |
def floats(start, end, n): |
172 |
return [float(x) * (end-start) / n + start |
return [float(x) * (end-start) / n + start |
173 |
for x in range(0,n+1)] |
for x in range(0,n+1)] |
|
def putAffine(vs, vob, key, d, x, y, xx, xy, yx, yy): |
|
|
cs = vs.coords.affineCoordsys(key, |
|
|
0, x, y, xx, xy, yx, yy) |
|
|
vs.map.put(vob, cs) |
|
|
|
|
|
|
|
|
|
|
|
def putnoc(vs, noc): |
|
|
vs.map.put(noc) |
|
|
|
|