reduce member fn
This commit is contained in:
@@ -497,15 +497,13 @@ enum Reduce{
|
||||
Reduced(Reduced),
|
||||
}
|
||||
|
||||
fn reduce(
|
||||
simplex:Simplex2_4,
|
||||
mesh:&MinkowskiMesh,
|
||||
point:Planar64Vec3,
|
||||
)->Reduce{
|
||||
match simplex{
|
||||
Simplex2_4::Simplex2(simplex)=>Reduce::Reduced(reduce2(simplex,mesh,point)),
|
||||
Simplex2_4::Simplex3(simplex)=>Reduce::Reduced(reduce3(simplex,mesh,point)),
|
||||
Simplex2_4::Simplex4(simplex)=>reduce4(simplex,mesh,point),
|
||||
impl Simplex2_4{
|
||||
fn reduce(self,mesh:&MinkowskiMesh,point:Planar64Vec3)->Reduce{
|
||||
match self{
|
||||
Self::Simplex2(simplex)=>Reduce::Reduced(reduce2(simplex,mesh,point)),
|
||||
Self::Simplex3(simplex)=>Reduce::Reduced(reduce3(simplex,mesh,point)),
|
||||
Self::Simplex4(simplex)=>reduce4(simplex,mesh,point),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,7 +634,7 @@ fn minimum_difference<const ENABLE_FAST_FAIL:bool,T>(
|
||||
}
|
||||
|
||||
// direction, a0, a1, b0, b1, c0, c1, d0, d1 = reduceSimplex(new_point_p, new_point_q, a0, a1, b0, b1, c0, c1)
|
||||
match reduce(simplex_big,mesh,point){
|
||||
match simplex_big.reduce(mesh,point){
|
||||
Reduce::Escape(simplex)=>{
|
||||
// Enough information to conclude that the meshes are intersecting.
|
||||
// Topology information is computed if needed.
|
||||
|
||||
Reference in New Issue
Block a user