use na::{Identity, Translate}; use na; use math::{Point, Vector, Isometry}; use entities::bounding_volume::{self, HasBoundingVolume, AABB}; use entities::partitioning::BVTCostFn; use entities::inspection::Repr; use entities::shape::CompositeShape; use ray::{Ray, RayCast}; use geometry::time_of_impact_internal; /// Time Of Impact of a composite shape with any other shape, under translational movement. pub fn composite_shape_against_any
(m1: &M, vel1: &P::Vect, g1: &G1,
m2: &M, vel2: &P::Vect, g2: &G2)
-> Option< ,
M: Isometry ,
G1: CompositeShape ,
G2: Repr + HasBoundingVolume (m1: &M, vel1: &P::Vect, g1: &G1,
m2: &M, vel2: &P::Vect, g2: &G2)
-> Option< ,
M: Isometry ,
G1: Repr + HasBoundingVolume {
composite_shape_against_any(m2, vel2, g2, m1, vel1, g1)
}
struct CompositeShapeAgainstAnyTOICostFn<'a, P: 'a + Point, M: 'a, G1: ?Sized + 'a, G2: ?Sized + 'a> {
msum_shift: P::Vect,
msum_margin: P::Vect,
ray: Ray ,
m1: &'a M,
vel1: &'a P::Vect,
g1: &'a G1,
m2: &'a M,
vel2: &'a P::Vect,
g2: &'a G2
}
impl<'a, P, M, G1: ?Sized, G2: ?Sized> CompositeShapeAgainstAnyTOICostFn<'a, P, M, G1, G2>
where P: Point,
M: Isometry ,
G1: CompositeShape ,
G2: Repr + HasBoundingVolume >
for CompositeShapeAgainstAnyTOICostFn<'a, P, M, G1, G2>
where P: Point,
P::Vect: Translate ,
M: Isometry ,
G1: CompositeShape ,
G2: Repr + HasBoundingVolume ) -> Option<