172 |
print "Seed: ",self.seed," pq ",self.pq |
print "Seed: ",self.seed," pq ",self.pq |
173 |
vs.map.put(self.pq, cs1, cs2) |
vs.map.put(self.pq, cs1, cs2) |
174 |
|
|
175 |
putText(vs, cs1, str(self.seed), color=(0,0,0), x=-1, y=-1, w=.0025, h=.0025) |
putText(vs, cs1, str(self.seed), color=(0,0,0), x=-1, y=-1, w=.085, h=.08) |
176 |
|
|
177 |
if self.renderPaper: |
if self.renderPaper: |
178 |
putnoc(vs, getDList(""" |
putnoc(vs, getDList(""" |
266 |
vs.matcher.add(cs1[i], str(i)) |
vs.matcher.add(cs1[i], str(i)) |
267 |
|
|
268 |
vs.map.put(self.pq[i], cs1[i], cs2) |
vs.map.put(self.pq[i], cs1[i], cs2) |
269 |
putText(vs, cs1[i], str(self.seed + i), color=(0,0,0), x=-1,y=1,z=-1,w=.01, h=.01) |
putText(vs, cs1[i], str(self.seed + i), color=(0,0,0), x=-1,y=1,z=-1,w=.32, h=.32) |
270 |
|
|
271 |
dobenchmark(w, vs) |
dobenchmark(w, vs) |
272 |
|
|
|
|
|
|
def getText(text, x = 0, y = 0, z = 2, w = 1, h = 1): |
|
|
return GLRen.createHorizText(getFont(), text, x, y, z, w,h) |
|
|
|
|
|
def putText(vs, cs1, text, color = None, x = 0, y = 0, z = 2, w = 1, h = 1): |
|
|
if color != None: |
|
|
putnoc(vs, getDListNocoords("Color " + js(color))) |
|
|
putnoc(vs, getDListNocoords(""" |
|
|
PushAttrib ENABLE_BIT |
|
|
Disable ALPHA_TEST |
|
|
Disable DEPTH_TEST |
|
|
Enable TEXTURE_2D |
|
|
Enable BLEND |
|
|
BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA |
|
|
""")) |
|
|
|
|
|
t = getText(text, x, y, z, w, h) |
|
|
vs.map.put(t, cs1) |
|
|
|
|
|
putnoc(vs, getDListNocoords(""" |
|
|
PopAttrib |
|
|
""")) |
|
|
|
|
|
|
|
273 |
class ColorMapScene: |
class ColorMapScene: |
274 |
def __init__(self): |
def __init__(self): |
275 |
self.bgcolor = (0,0,0) |
self.bgcolor = (0,0,0) |
317 |
cs1 = vs.coords.affineCoordsys(0, 10, 600, 500, 450, 0, 0, 450) |
cs1 = vs.coords.affineCoordsys(0, 10, 600, 500, 450, 0, 0, 450) |
318 |
vs.matcher.add(cs1, "1") |
vs.matcher.add(cs1, "1") |
319 |
|
|
320 |
putText(vs, cs1, "F1, F2", color=(0,0,0), w=.005, h=.005) |
putText(vs, cs1, "F1, F2", color=(0,0,0), w=.16, h=.16) |
321 |
|
|
322 |
|
|
323 |
|
|