44 |
self.cs = { } |
self.cs = { } |
45 |
|
|
46 |
self.ctrx = vs.size.width / 2 |
self.ctrx = vs.size.width / 2 |
47 |
self.ctry = vs.size.height / 7 * 3 |
self.ctry = vs.size.height * .485 # A *little* above real ctr |
48 |
|
|
49 |
mainsize = vs.size.width * .5 |
mainsize = vs.size.width * .5 |
50 |
|
|
55 |
|
|
56 |
center = vs.translateCS(0, "Center", self.ctrx, self.ctry) |
center = vs.translateCS(0, "Center", self.ctrx, self.ctry) |
57 |
|
|
58 |
main = vs.orthoBoxCS(center, "MAINVP", 0, |
into = vs.orthoBoxCS(center, "MAINVP", 0, |
59 |
-mainsize/2, -mainsize/2, 1, 1, mainsize, mainsize) |
-mainsize/2, -mainsize/2, 1, 1, mainsize, mainsize) |
|
self.vs.activate(main) |
|
60 |
|
|
61 |
into = self.nadir(main) |
self.vs.activate(into) |
62 |
|
|
63 |
self.links = [] |
self.links = [] |
64 |
self.mainNode.renderMain(vs, into) |
self.mainNode.renderMain(vs, into) |
65 |
for l in self.links: self.linkReally(*l) |
for l in self.links: self.linkReally(*l) |
66 |
self.cs[main] = None |
self.cs[into] = None |
67 |
|
|
68 |
# Interpolation : old buoy -> to new main vp |
# Interpolation : old buoy -> to new main vp |
69 |
if hasattr(self, "animationCS_buoy") and \ |
if hasattr(self, "animationCS_buoy") and \ |
70 |
self.animationCS_buoy != None: |
self.animationCS_buoy != None: |
71 |
self.vs.matcher.keymapSingleCoordsys(into, self.animationCS_buoy[0][3]) |
self.vs.matcher.keymapSingleCoordsys(into, self.animationCS_buoy[0]) |
72 |
self.animationCS_buoy = None |
self.animationCS_buoy = None |
73 |
|
|
74 |
self.mainCS = into |
self.mainCS = into |
103 |
into = self.nadir(into) |
into = self.nadir(into) |
104 |
self.vs.activate(into) |
self.vs.activate(into) |
105 |
otherAnchorCS = otherNode.renderBuoy(self.vs, into, linkId, otherAnchor, None) |
otherAnchorCS = otherNode.renderBuoy(self.vs, into, linkId, otherAnchor, None) |
106 |
self.cs[into] = (otherNode, linkId, otherAnchor, otherAnchorCS) |
self.cs[into] = (otherNode, linkId, otherAnchor, into) |
107 |
self.vs.map.put(GLCache.getCallList(""" |
self.vs.map.put(GLCache.getCallList(""" |
108 |
PushAttrib ENABLE_BIT LINE_BIT |
PushAttrib ENABLE_BIT LINE_BIT |
109 |
Disable TEXTURE_2D |
Disable TEXTURE_2D |
147 |
if ev.getID() != ev.MOUSE_CLICKED: |
if ev.getID() != ev.MOUSE_CLICKED: |
148 |
return |
return |
149 |
|
|
150 |
self.animationCS_buoy = [link, self.vs] |
self.animationCS_buoy = [cs, link, self.vs] |
151 |
self.animationCS_main = [self.mainCS, link, self.vs] |
self.animationCS_main = [self.mainCS, link, self.vs] |
152 |
|
|
153 |
self.mainNode = link[0].createMainNode(link[1], link[2], self) |
self.mainNode = link[0].createMainNode(link[1], link[2], self) |