Trait mold2d::raycast::Polygon
[−]
[src]
pub trait Polygon { fn sides(&self) -> Vec<Segment>; fn collision_from_side(&self, id: usize) -> Option<CollisionSide>; }
Required Methods
fn sides(&self) -> Vec<Segment>
Returns the sides in a polygon shape as a dynamic array of segments
fn collision_from_side(&self, id: usize) -> Option<CollisionSide>
Given a side number of the polygon, returns the side of the collision
Implementors
impl Polygon for Rect