Struct rhusics_ecs::BasicCollisionSystem [] [src]

pub struct BasicCollisionSystem<P, T, D, B, Y = ()> where
    P: Primitive,
    B: Bound
{ /* fields omitted */ }

Collision detection system for use with specs.

Has support for both broad phase and narrow phase collision detection. Will only do narrow phase if both broad and narrow phase is activated.

Can handle any transform component type, as long as the type implements Transform, and as long as the storage is wrapped in a FlaggedStorage.

Type parameters:

  • P: Shape primitive
  • T: Transform
  • D: Data accepted by broad phase
  • B: Bounding volume
  • Y: Shape type, see Collider

System Function:

fn(Entities, T, NextFrame<T>, CollisionShape) -> (CollisionShape, EventChannel<ContactEvent>)

Methods

impl<P, T, D, B, Y> BasicCollisionSystem<P, T, D, B, Y> where
    P: Primitive + Send + Sync + 'static,
    <P::Point as EuclideanSpace>::Diff: Debug,
    T: Transform<P::Point> + Component,
    D: HasBound<Bound = B>,
    B: Bound<Point = P::Point>, 
[src]

[src]

Create a new collision detection system, with no broad or narrow phase activated.

[src]

Specify what narrow phase algorithm to use

[src]

Specify what broad phase algorithm to use

Trait Implementations

impl<'a, P, T, Y, D, B> System<'a> for BasicCollisionSystem<P, T, D, B, Y> where
    P: Primitive + ComputeBound<B> + Send + Sync + 'static,
    P::Point: Debug + Send + Sync + 'static,
    <P::Point as EuclideanSpace>::Scalar: Send + Sync + 'static,
    <P::Point as EuclideanSpace>::Diff: Debug + Send + Sync + 'static,
    T: Component + Transform<P::Point> + Send + Sync + Clone + 'static,
    Y: Default + Send + Sync + 'static,
    B: Bound<Point = P::Point> + Send + Sync + 'static + Union<B, Output = B> + Clone,
    D: HasBound<Bound = B> + From<(Entity, B)> + GetId<Entity>,
    &'b T::Storage: Join<Type = &'b T>, 
[src]

The resource bundle required to execute this system. Read more

[src]

Executes the system with the required system data. Read more

[src]

Returns a hint how long the system needs for running. This is used to optimize the way they're executed (might allow more parallelization). Read more

Auto Trait Implementations

impl<P, T, D, B, Y> Send for BasicCollisionSystem<P, T, D, B, Y>

impl<P, T, D, B, Y = ()> !Sync for BasicCollisionSystem<P, T, D, B, Y>