pub struct CollisionGpuPipeline {
pub broadphase: BroadphaseGpuKernel,
pub narrowphase: NarrowphaseGpuKernel,
pub manifolds: Vec<PersistentManifoldGpu>,
pub contacts: Vec<ContactResult>,
}Expand description
Combined broadphase + narrowphase collision pipeline.
Holds the configuration for both stages and maintains a list of persistent manifolds from the previous frame for warm starting.
Fields§
§broadphase: BroadphaseGpuKernelBroadphase kernel configuration.
narrowphase: NarrowphaseGpuKernelNarrowphase kernel.
manifolds: Vec<PersistentManifoldGpu>Persistent manifolds from the previous timestep.
contacts: Vec<ContactResult>Contact list from the most recent dispatch.
Implementations§
Source§impl CollisionGpuPipeline
impl CollisionGpuPipeline
Sourcepub fn dispatch(&mut self, aabbs: &[AabbGpu])
pub fn dispatch(&mut self, aabbs: &[AabbGpu])
Run one full collision detection pass over aabbs.
- Broadphase: find overlapping AABB pairs.
- Narrowphase: compute contact points for each pair.
- Update persistent manifolds.
Sourcepub fn dispatch_bvh(&mut self, aabbs: &[AabbGpu])
pub fn dispatch_bvh(&mut self, aabbs: &[AabbGpu])
Run the full pipeline using BVH-accelerated broadphase.
Sourcepub fn total_contact_points(&self) -> usize
pub fn total_contact_points(&self) -> usize
Return the total number of contact points across all manifolds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CollisionGpuPipeline
impl RefUnwindSafe for CollisionGpuPipeline
impl Send for CollisionGpuPipeline
impl Sync for CollisionGpuPipeline
impl Unpin for CollisionGpuPipeline
impl UnsafeUnpin for CollisionGpuPipeline
impl UnwindSafe for CollisionGpuPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more