class

PointClickEngine::Scenes::PolygonCollisionDetector

Inherits Reference < Object

Handles point-in-polygon collision detection

Instance methods

calculate_bounds(vertices : Array(RL::Vector2)) : RL::Rectangle

Calculate bounding box for a set of vertices

Source
calculate_combined_bounds(regions : Array(PolygonRegion)) : RL::Rectangle

Calculate bounding box for multiple polygons

Source
contains_point?(vertices : Array(RL::Vector2), point : RL::Vector2) : Bool

Check if a point is inside a polygon using ray casting algorithm

Source
point_in_bounds?(point : RL::Vector2, bounds : RL::Rectangle) : Bool

Check if a point is within a rectangle (fast bounds check)

Source