Struct rhusics_ecs::SpatialSortingSystem[][src]

pub struct SpatialSortingSystem<P, T, D, B, Y = ()> { /* fields omitted */ }

Spatial sorting system for use with specs.

Will perform spatial sorting of the collision world. Uses a Dynamic Bounding Volume Tree for sorting. Will update entries in the tree where the pose is dirty.

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

Type parameters:

  • P: Primitive type, needs to implement Primitive.
  • T: Transform type, needs to implement Transform and have FlaggedStorage.
  • D: Type of values stored in the DBVT, needs to implement TreeValue and From<(Entity, CollisionShape)>
  • B: Bounding volume
  • Y: Shape type, see Collider

System Function:

fn(Entities, T, NextFrame<T>, CollisionShape) -> (CollisionShape, DynamicBoundingVolumeTree<D>)

Methods

impl<P, T, D, B, Y> SpatialSortingSystem<P, T, D, B, Y>
[src]

Create a new sorting system.

Trait Implementations

impl<P: Debug, T: Debug, D: Debug, B: Debug, Y: Debug> Debug for SpatialSortingSystem<P, T, D, B, Y>
[src]

Formats the value using the given formatter. Read more

impl<'a, P, T, Y, D, B> System<'a> for SpatialSortingSystem<P, T, D, B, Y> where
    P: Primitive + ComputeBound<B> + Send + Sync + 'static,
    B: Clone + Debug + Send + Sync + Union<B, Output = B> + Bound<Point = P::Point> + Contains<B> + SurfaceArea<Scalar = <P::Point as EuclideanSpace>::Scalar> + Send + Sync + 'static,
    P::Point: Debug,
    <P::Point as EuclideanSpace>::Scalar: BaseFloat + Send + Sync + 'static,
    <P::Point as EuclideanSpace>::Diff: Debug + Send + Sync,
    T: Component + Clone + Debug + Transform<P::Point> + Send + Sync,
    T::Storage: Tracked,
    Y: Default + Send + Sync + 'static,
    D: Send + Sync + 'static + TreeValue<Bound = B> + From<(Entity, B)>, 
[src]

The resource bundle required to execute this system. Read more

Executes the system with the required system data. Read more

Sets up the Resources using Self::SystemData::setup.

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

Return the accessor from the [SystemData].

Auto Trait Implementations

impl<P, T, D, B, Y> Send for SpatialSortingSystem<P, T, D, B, Y> where
    B: Send,
    D: Send,
    P: Send,
    T: Send,
    Y: Send

impl<P, T, D, B, Y> Sync for SpatialSortingSystem<P, T, D, B, Y> where
    B: Sync,
    D: Sync,
    P: Sync,
    T: Sync,
    Y: Sync