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§
Sourcefn ti1(&self) -> c_float
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
Sourcefn ti2(&self) -> c_float
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
Sourcefn entry_point(&self) -> &CollisionPoint
fn entry_point(&self) -> &CollisionPoint
The coordinates of the first intersection between sprite and the line segment
fn entry_point_mut(&mut self) -> &mut CollisionPoint
Sourcefn exit_point(&self) -> &CollisionPoint
fn exit_point(&self) -> &CollisionPoint
The coordinates of the second intersection between sprite and the line segment