예제 #1
0
파일: boid.py 프로젝트: tomdml/boids
 def get_arrow_points(self):
     front = self.pos + Vector2D.from_scalars(self.vel.direction, 10)
     left = self.pos + Vector2D.from_scalars(self.vel.direction + (5 / 4 * math.pi), 5)
     right = self.pos + Vector2D.from_scalars(self.vel.direction + (-5 / 4 * math.pi), 5)
     return (front, left, self.pos, right)
예제 #2
0
파일: boid.py 프로젝트: tomdml/boids
 def get_fov_line_points(self):
     left = self.pos + Vector2D.from_scalars(self.vel.direction + (math.radians(Config.FOV / 2)), Config.VIEW_RADIUS)
     right = self.pos + Vector2D.from_scalars(self.vel.direction - (math.radians(Config.FOV / 2)), Config.VIEW_RADIUS)
     return (left, self.pos, right)
예제 #3
0
파일: boid.py 프로젝트: tomdml/boids
 def get_line_points(self):
     front = self.pos + Vector2D.from_scalars(self.vel.direction, 20)
     return (front, self.pos)