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§