Enum caper::collision::CollisionInfo
[−]
[src]
pub enum CollisionInfo { Separate3D { top: f32, bottom: f32, right: f32, left: f32, up: f32, down: f32, }, Separate2D { top: f32, bottom: f32, right: f32, left: f32, }, Overlapping, NoCollision, }
enum to return the informaiton on a collision test
Variants
Separate3D
Represents the distance of separation in 3d space
Fields of Separate3D
top: f32 | The overlapping distance at the front of the objects (slightly confusing used for parity with Separate 2D) |
bottom: f32 | The overlapping distance at the back of the objects (slightly confusing used for parity with Separate 2D) |
right: f32 | The overlapping distance at the right of the objects |
left: f32 | The overlapping distance at the left of the objects |
up: f32 | The overlapping distance above the objects |
down: f32 | The overlapping distance below the objects |
Separate2D
Represents the distance of separation in 2d space
Fields of Separate2D
top: f32 | The overlapping distance at the top of the objects |
bottom: f32 | The overlapping distance at the bottom of the objects |
right: f32 | The overlapping distance at the left of the objects |
left: f32 | The overlapping distance at the right of the objects |
Overlapping
Used for if two objects are overlapping each other
NoCollision
When no collision has taken place
Trait Implementations
impl PartialEq for CollisionInfo
[src]
fn eq(&self, __arg_0: &CollisionInfo) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CollisionInfo) -> bool
This method tests for !=
.