Exemplo n.º 1
0
 def tag_obs(self, radius):
     self.untag_obs()
     for otherAgents in self.world.obstacles:
         to = self.pos - otherAgents.pos
         gap = radius + otherAgents.radius
         if Vector2D.length_sq(to) < gap**2:
             otherAgents.tagged = True;
Exemplo n.º 2
0
 def tag_neighbours(self, radius):
     self.untag()
     for otherAgents in self.world.agents:
         to = self.pos - otherAgents.pos
         gap = radius + otherAgents.tag_radius
         if Vector2D.length_sq(to) < gap**2:
             otherAgents.tagged = True
Exemplo n.º 3
0
 def tag_neighbours(self, radius):
     self.untag()
     for otherAgents in self.world.agents:
         to = self.pos - otherAgents.pos
         gap = radius + otherAgents.tag_radius
         if Vector2D.length_sq(to) < gap**2:
             otherAgents.tagged = True;