class FogOfWar::Line
- FogOfWar::Line
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
fog_of_war/line.crConstant Summary
-
Color =
SF::Color.new(38, 25, 17)
-
PointLineCollisionPrecision =
0.001
-
Thickness =
8
Constructors
Instance Method Summary
- #add_point(point : Point)
- #collision_with_circle?(cx, cy, r)
- #draw(window : SF::RenderWindow)
- #draw_line(window, point, next_point)
- #draw_point_circle(window, point)
- #line_distance(x1, y1, x2, y2)
-
#lines
TODO cache this, and uncache if points change
- #point_in_circle?(px, py, cx, cy, r)
- #point_in_line?(x1, y1, x2, y2, px, py)
- #points : Array(Point)
- #thickness