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

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>)

Implementations

Create a new sorting system.

Trait Implementations

Formats the value using the given formatter. Read more
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.
Performs clean up that requires resources from the Resources. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Runs the system now. Read more
Sets up Resources for a later call to run_now.
Performs clean up that requires resources from the Resources. Read more
Sets up Resources for a later call to run.
Runs the system/group of systems. Possibly in parallel depending on how the structure is set up. Read more
Accumulates the necessary read/shared resources from the systems in this group. Read more
Accumulates the necessary write/exclusive resources from the systems in this group. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.