236 |
hit = jarray.zeros(1, 'f') |
hit = jarray.zeros(1, 'f') |
237 |
theTopMostMainNode = None |
theTopMostMainNode = None |
238 |
depth = None |
depth = None |
239 |
|
print "Topmost:" |
240 |
for single in self.singles: |
for single in self.singles: |
241 |
|
print "look at:",single, single.mainNode |
242 |
if single.mainNode.hasMouseHit(vs, x, y, hit): |
if single.mainNode.hasMouseHit(vs, x, y, hit): |
243 |
if not depth: |
print "hit:",hit[0] |
244 |
|
if depth == None or depth < hit[0]: |
245 |
depth = hit[0] |
depth = hit[0] |
246 |
theTopMostMainNode = single.mainNode |
theTopMostMainNode = single.mainNode |
247 |
else: |
print "Ret: ", theTopMostMainNode |
|
if depth < hit[0]: |
|
|
theTopMostMainNode = single.mainNode |
|
248 |
return theTopMostMainNode |
return theTopMostMainNode |
249 |
|
|
250 |
def findIfBuoyHit(self, vs, x, y): |
def findIfBuoyHit(self, vs, x, y): |