SpriteQueryInfoExt

Trait SpriteQueryInfoExt 

Source
pub trait SpriteQueryInfoExt {
    // Required methods
    fn sprite(&self) -> SpriteRef;
    fn ti1(&self) -> c_float;
    fn ti2(&self) -> c_float;
    fn entry_point(&self) -> &CollisionPoint;
    fn entry_point_mut(&mut self) -> &mut CollisionPoint;
    fn exit_point(&self) -> &CollisionPoint;
    fn exit_point_mut(&mut self) -> &mut CollisionPoint;
}

Required Methods§

Source

fn sprite(&self) -> SpriteRef

The sprite being intersected by the segment

Source

fn ti1(&self) -> c_float

Entry point

ti1 and ti2 are numbers between 0 and 1 which indicate how far from the starting point of the line segment the collision happened

Source

fn ti2(&self) -> c_float

Exit point

ti1 and ti2 are numbers between 0 and 1 which indicate how far from the starting point of the line segment the collision happened

Source

fn entry_point(&self) -> &CollisionPoint

The coordinates of the first intersection between sprite and the line segment

Source

fn entry_point_mut(&mut self) -> &mut CollisionPoint

Source

fn exit_point(&self) -> &CollisionPoint

The coordinates of the second intersection between sprite and the line segment

Source

fn exit_point_mut(&mut self) -> &mut CollisionPoint

Implementations on Foreign Types§

Source§

impl SpriteQueryInfoExt for SpriteQueryInfo

Source§

fn sprite(&self) -> SpriteRef

Source§

fn ti1(&self) -> c_float

Source§

fn ti2(&self) -> c_float

Source§

fn entry_point(&self) -> &CollisionPoint

Source§

fn entry_point_mut(&mut self) -> &mut CollisionPoint

Source§

fn exit_point(&self) -> &CollisionPoint

Source§

fn exit_point_mut(&mut self) -> &mut CollisionPoint

Implementors§