use std::fmt::Debug; use std::marker; use amethyst::core::cgmath::{ Array, EuclideanSpace, InnerSpace, Quaternion, Rotation, Vector3, Zero, }; use amethyst::core::{Result, SystemBundle}; use amethyst::ecs::prelude::DispatcherBuilder; use amethyst_rhusics::Convert; use collision::{Bound, ComputeBound, Primitive, Union}; use rand::Rand; use rhusics_core::Inertia; use super::{BoxDeletionSystem, EmissionSystem}; /// Bundle for box simulation. /// /// Add spawn and deletion systems. /// /// ### Type parameters: /// /// - `P`: Collision primitive (see `collision::primitive` for more information) /// - `B`: Bounding volume (usually `Aabb2`, `Aabb3` or `Sphere`) /// - `R`: Rotational quantity (`Basis2` or `Quaternion`) /// - `A`: Angular velocity quantity (`Scalar` or `Vector3`) /// - `I`: Inertia tensor (`Scalar` or `Matrix3`) pub struct BoxSimulationBundle
{ primitive: P, m: marker::PhantomData<(B, R, A, I)>, } impl
BoxSimulationBundle
{ pub fn new(primitive: P) -> Self { Self { primitive, m: marker::PhantomData, } } } impl<'a, 'b, P, B, R, A, I> SystemBundle<'a, 'b> for BoxSimulationBundle
where
B: Bound