コード例 #1
0
 def findContents(self, candidates=None):
     if candidates is None:
         candidates = xrange(self.a.order())
     for p in candidates:
         if p in self.verts:
             continue
         if geometry.sphereTriContains(self.pts, self.a.node[p]['xyz']):
             self.contents.append(p)
コード例 #2
0
ファイル: Triangle.py プロジェクト: ThellraAK/maxfield
 def findContents(self,candidates=None):
     if candidates is None:
         candidates = xrange(self.a.order())
     for p in candidates:
         if p in self.verts:
             continue
         if geometry.sphereTriContains(self.pts,self.a.node[p]['xyz']):
             self.contents.append(p)
コード例 #3
0
 def findContents(self,candidates=None):
     if candidates == None:
         candidates = xrange(self.a.order())
     triangleKey = sum([1 << int(p) for p in self.verts])
     if triangleKey in triangleContentCache:
         self.contents.extend(triangleContentCache[triangleKey])
     else:
         for p in candidates:
             if p in self.verts:
                 continue
             if geometry.sphereTriContains(self.pts,self.a.node[p]['xyz']):
                 self.contents.append(p)
         triangleContentCache[triangleKey] = self.contents