33 |
clip = GLRen.createClipSquare() |
clip = GLRen.createClipSquare() |
34 |
stopclip = GLRen.createStopClipSquare() |
stopclip = GLRen.createStopClipSquare() |
35 |
|
|
36 |
|
lineconn = GLRen.createLineConnector(-10, -10) |
37 |
|
|
38 |
class PlaneViewScene: |
class PlaneViewScene: |
39 |
def __init__(self): |
def __init__(self): |
40 |
self.pv = PlaneView(VobKeyer()) |
self.pv = PlaneView(VobKeyer()) |
41 |
self.scale = 0.01 |
self.scale = 0.01 |
42 |
def scene(self, vs): |
def scene(self, vs): |
43 |
bf = effects.CircleFloater4(vs, 0, (500, 400), 300, (000,300)) |
dim = vs.getSize() |
44 |
|
|
45 |
|
ctr = (dim.width/2, dim.height/2) |
46 |
|
(w,h) = 600, 500 |
47 |
|
|
48 |
|
bf = effects.CircleFloater4(vs, 0, ctr, 300, (0,ctr[1])) |
49 |
|
|
50 |
vs.map.put(background((0.4,0.5,0.8))) |
vs.map.put(background((0.4,0.5,0.8))) |
51 |
# Viewport |
# Viewport |
52 |
self.cs1 = vs.coords.affineCoordsys(0, 0, 100, 100, 600, 0, 0, 600) |
self.cs1 = vs.coords.coordsys(0, 0, ctr[0]-w/2, ctr[1]-h/2, w, h) |
53 |
# Paper to viewport |
# Paper to viewport |
54 |
self.cs2 = vs.coords.affineCoordsys(0, 0, 0, 0, self.scale, 0, 0, self.scale) |
self.cs2 = vs.coords.affineCoordsys(0, 0, 0, 0, self.scale, 0, 0, self.scale) |
55 |
vs.matcher.add(self.cs1, "Global") |
vs.matcher.add(self.cs1, "Global") |
66 |
|
|
67 |
flo = bf.buoyCoordsys(anchor, "FOO") |
flo = bf.buoyCoordsys(anchor, "FOO") |
68 |
(w,h) = (100,100) |
(w,h) = (100,100) |
69 |
mag = vs.coords.coordsys(flo, -5, -w, -h, w, h) |
mag = vs.coords.coordsys(flo, -5, -w/2, -h/2, w, h) |
70 |
|
|
71 |
vs.map.put(coloredQuad((1,0,0)), mag) |
vs.map.put(coloredQuad((1,0,0)), mag) |
72 |
|
|
73 |
|
vs.map.put(getDListNocoords(""" |
74 |
|
Color 0 0 0 |
75 |
|
LineWidth 2 |
76 |
|
""")) |
77 |
|
|
78 |
|
vs.map.put(lineconn, anchor, flo) |
79 |
|
|
80 |
self.currentvs = vs |
self.currentvs = vs |
81 |
def key(self, key): |
def key(self, key): |
82 |
pass |
pass |