51 |
center = vs.translateCS(0, "Center", self.ctrx, self.ctry) |
center = vs.translateCS(0, "Center", self.ctrx, self.ctry) |
52 |
|
|
53 |
main = vs.orthoBoxCS(center, "MAINVP", 0, |
main = vs.orthoBoxCS(center, "MAINVP", 0, |
54 |
-mainsize/2, -mainsize/2, 1, 1, mainsize, mainsize) |
-mainsize/2, -mainsize/2, 1, 1, mainsize, mainsize) |
55 |
self.vs.activate(main) |
self.vs.activate(main) |
56 |
|
|
57 |
self.mainNode.renderMain(vs, self.nadir(main)) |
self.mainNode.renderMain(vs, self.nadir(main)) |
58 |
self.cs[main] = None |
self.cs[main] = None |
59 |
|
|
60 |
|
if hasattr(self, "animationCS_buoy"): |
61 |
|
# Interpolation : buoy -> to main vp |
62 |
|
self.vs.matcher.keymapSingleCoordsys(main, |
63 |
|
self.animationCS_buoy) |
64 |
|
self.mainCS = main |
65 |
|
|
66 |
def link(self, direction, anchorCS, otherNode, linkId, otherAnchor): |
def link(self, direction, anchorCS, otherNode, linkId, otherAnchor): |
67 |
x = self.ctrx |
x = self.ctrx |
99 |
PopAttrib |
PopAttrib |
100 |
""")) |
""")) |
101 |
|
|
102 |
|
print 'Link ID: ', linkId |
103 |
|
if hasattr(self, "animationCS_main") and \ |
104 |
|
self.animationCS_main != None and \ |
105 |
|
linkId == self.animationCS_main[1]: |
106 |
|
print 'Main to Buoy interpolation..' |
107 |
|
# Interpolation : mainvp -> to buoy |
108 |
|
self.vs.matcher.keymapSingleCoordsys(into, |
109 |
|
self.animationCS_main[0]) |
110 |
|
self.animationCS_main = None |
111 |
|
|
112 |
|
|
113 |
def key(self, key): |
def key(self, key): |
114 |
gzz.client.AbstractUpdateManager.chg() |
gzz.client.AbstractUpdateManager.chg() |
115 |
pass |
pass |
116 |
|
|
117 |
def mouse(self, ev): |
def mouse(self, ev): |
118 |
|
if ev.getID() == ev.MOUSE_PRESSED: |
119 |
|
return |
120 |
|
|
121 |
# print ev |
# print ev |
122 |
x, y = ev.getX(), ev.getY() |
x, y = ev.getX(), ev.getY() |
123 |
cs = self.vs.getCSAt(0, x, y, None) |
cs = self.vs.getCSAt(0, x, y, None) |
130 |
gzz.client.AbstractUpdateManager.chg() |
gzz.client.AbstractUpdateManager.chg() |
131 |
else: |
else: |
132 |
self.mainNode = link[0].createMainNode(link[1], link[2], self) |
self.mainNode = link[0].createMainNode(link[1], link[2], self) |
133 |
|
|
134 |
|
self.animationCS_buoy = cs |
135 |
|
self.animationCS_main = [self.mainCS, link] |
136 |
|
|
137 |
gzz.client.AbstractUpdateManager.chg() |
gzz.client.AbstractUpdateManager.chg() |
138 |
|
|