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 implementPrimitive
.T
: Transform type, needs to implementTransform
and haveFlaggedStorage
.D
: Type of values stored in the DBVT, needs to implementTreeValue
andFrom<(Entity, CollisionShape)>
B
: Bounding volumeY
: Shape type, seeCollider
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]
impl<P, T, D, B, Y> SpatialSortingSystem<P, T, D, B, Y>
Trait Implementations
impl<P: Debug, T: Debug, D: Debug, B: Debug, Y: Debug> Debug for SpatialSortingSystem<P, T, D, B, Y>
[src]
impl<P: Debug, T: Debug, D: Debug, B: Debug, Y: Debug> Debug for SpatialSortingSystem<P, T, D, B, Y>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
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]
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)>,
type SystemData = (Entities<'a>, ReadStorage<'a, T>, ReadStorage<'a, NextFrame<T>>, WriteStorage<'a, CollisionShape<P, T, B, Y>>, Write<'a, DynamicBoundingVolumeTree<D>>)
The resource bundle required to execute this system. Read more
fn run(&mut self, (entities, poses, next_poses, shapes, tree): Self::SystemData)
[src]
fn run(&mut self, (entities, poses, next_poses, shapes, tree): Self::SystemData)
Executes the system with the required system data. Read more
fn setup(&mut self, res: &mut Resources)
[src]
fn setup(&mut self, res: &mut Resources)
Sets up the Resources
using Self::SystemData::setup
.
fn running_time(&self) -> RunningTime
[src]
fn running_time(&self) -> RunningTime
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
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
[src]
fn accessor(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the [SystemData
].