46 |
|
|
47 |
This is a demo "scene" |
This is a demo "scene" |
48 |
""" |
""" |
49 |
def __init__(self, initBuoyviewnodetype, initLinkId, initAnchor): |
def __init__(self, mainNode, connectors): |
50 |
"""Create a new RealBuoyManager. |
"""Create a new RealBuoyManager. |
51 |
|
|
52 |
Parameters are the initial node type, whose |
Parameters are the initial main node |
53 |
createMainNode method is called with the given |
and the BuoyViewConnectors to be used |
54 |
initLinkId and initAnchor parameters to create |
by the buoy manager to create buoys. |
|
the main view. |
|
55 |
""" |
""" |
56 |
self.replaceScene = None |
self.replaceScene = None |
57 |
self.mainNode = initBuoyviewnodetype.createMainNode( |
self.mainNode = mainNode |
58 |
initLinkId, initAnchor, self) |
self.connectors = connectors |
59 |
def nadir(self, cs): |
def nadir(self, cs): |
60 |
n = self.vs.coords.nadirUnitSq(cs, self.nadirCS) |
n = self.vs.coords.nadirUnitSq(cs, self.nadirCS) |
61 |
self.vs.matcher.add(cs, n, "NADIR") |
self.vs.matcher.add(cs, n, "NADIR") |
87 |
|
|
88 |
self.vs.activate(into) |
self.vs.activate(into) |
89 |
|
|
|
self.links = [] |
|
90 |
self.mainNode.renderMain(vs, into) |
self.mainNode.renderMain(vs, into) |
91 |
|
|
92 |
|
self.links = [] |
93 |
|
for connector in self.connectors: |
94 |
|
connector.addBuoys(vs, into, self) |
95 |
for l in self.links: self.linkReally(*l) |
for l in self.links: self.linkReally(*l) |
96 |
self.cs[into] = None |
self.cs[into] = None |
97 |
|
|