Ejemplo n.º 1
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
Ejemplo n.º 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
Ejemplo n.º 3
0
Archivo: world.py Proyecto: 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
Ejemplo n.º 4
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"
Ejemplo n.º 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"
Ejemplo n.º 6
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:
             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