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

Represents the distance of separation in 3d space

Fields of Separate3D

The overlapping distance at the front of the objects (slightly confusing used for parity with Separate 2D)

The overlapping distance at the back of the objects (slightly confusing used for parity with Separate 2D)

The overlapping distance at the right of the objects

The overlapping distance at the left of the objects

The overlapping distance above the objects

The overlapping distance below the objects

Represents the distance of separation in 2d space

Fields of Separate2D

The overlapping distance at the top of the objects

The overlapping distance at the bottom of the objects

The overlapping distance at the left of the objects

The overlapping distance at the right of the objects

Used for if two objects are overlapping each other

When no collision has taken place

Trait Implementations

impl PartialEq for CollisionInfo
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.