示例#1
0
文件: world.py 项目: danginsburg/Fos
 def find_selected_actor(self, near, far):
     """ Finds the first actor """
     for a in self.ag.actors:
         # aabb intersection
         if not a.aabb is None:
             if test_segment_aabb(near, far, a.aabb.coord[0], a.aabb.coord[1]):
                 print "found aabb"
                 return a
             else:
                 print "no aabb"
                 return None
示例#2
0
 def find_selected_actor(self, near, far):
     """ Finds the first actor """
     for a in self.ag.actors:
         # aabb intersection
         if not a.aabb is None:
             if test_segment_aabb(near, far, a.aabb.coord[0],
                                  a.aabb.coord[1]):
                 print "found aabb"
                 return a
             else:
                 print "no aabb"
                 return None
示例#3
0
文件: world.py 项目: arokem/Fos
 def find_selected_actor(self, near, far):
     """ Finds the first actor """
     for a in self.ag.actors:
         # aabb intersection
         if not a.aabb is None:
             ab1, ab2 = a.get_aabb_coords()
             if test_segment_aabb(near, far, ab1, ab2):
                 print "found aabb"
                 return a
             else:
                 print "no aabb"
                 return None
示例#4
0
文件: world.py 项目: danginsburg/Fos
 def propagate_pickray(self, near, far):
     # propagate the pickray to all the actors
     # XXX: implement intersection with the bounding boxes first
     
     for a in self.ag.actors:
         # aabb intersection
         if not a.aabb is None:
             if test_segment_aabb(near, far, a.aabb.coord[0], a.aabb.coord[1]):
                 print "found aabb"
                 try:
                     a.process_pickray(near,far)
                 except:
                     pass
             else:
                 print "no aabb"
示例#5
0
    def propagate_pickray(self, near, far):
        # propagate the pickray to all the actors
        # XXX: implement intersection with the bounding boxes first

        for a in self.ag.actors:
            # aabb intersection
            if not a.aabb is None:
                if test_segment_aabb(near, far, a.aabb.coord[0],
                                     a.aabb.coord[1]):
                    print "found aabb"
                    try:
                        a.process_pickray(near, far)
                    except:
                        pass
                else:
                    print "no aabb"
示例#6
0
文件: world.py 项目: fos/fos-legacy
 def propagate_pickray(self, near, far):
     # propagate the pickray to all the actors
     # XXX: implement intersection with the bounding boxes first
     
     for a in self.ag.actors:
         # aabb intersection
         if not a.aabb is None:
             ab1, ab2 = a.get_aabb_coords()
             #print 'pick', ab1, ab2
             if test_segment_aabb(near, far, ab1, ab2):
                 #print "found aabb"
                 try:
                     a.process_pickray(near,far)
                 except Exception as e:
                     print e
             else:
                 #print "no aabb"
                 pass