mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-05 14:55:55 +00:00
Remove unused argument
This commit is contained in:
parent
879e005ab9
commit
196df2cd3f
@ -30,12 +30,12 @@ impl FaceFaceIntersection {
|
||||
/// Compute the intersections between two faces
|
||||
pub fn compute(
|
||||
faces: [&Face; 2],
|
||||
objects: &mut Service<Objects>,
|
||||
_: &mut Service<Objects>,
|
||||
) -> Option<Self> {
|
||||
let surfaces = faces.map(|face| face.surface().clone());
|
||||
|
||||
let intersection_curves =
|
||||
match SurfaceSurfaceIntersection::compute(surfaces, objects) {
|
||||
match SurfaceSurfaceIntersection::compute(surfaces) {
|
||||
Some(intersection) => intersection.intersection_curves,
|
||||
None => return None,
|
||||
};
|
||||
|
@ -2,8 +2,7 @@ use fj_math::{Line, Plane, Point, Scalar};
|
||||
|
||||
use crate::{
|
||||
geometry::path::{GlobalPath, SurfacePath},
|
||||
objects::{Objects, Surface},
|
||||
services::Service,
|
||||
objects::Surface,
|
||||
storage::Handle,
|
||||
};
|
||||
|
||||
@ -16,10 +15,7 @@ pub struct SurfaceSurfaceIntersection {
|
||||
|
||||
impl SurfaceSurfaceIntersection {
|
||||
/// Compute the intersection between two surfaces
|
||||
pub fn compute(
|
||||
surfaces: [Handle<Surface>; 2],
|
||||
_: &mut Service<Objects>,
|
||||
) -> Option<Self> {
|
||||
pub fn compute(surfaces: [Handle<Surface>; 2]) -> Option<Self> {
|
||||
// Algorithm from Real-Time Collision Detection by Christer Ericson. See
|
||||
// section 5.4.4, Intersection of Two Planes.
|
||||
//
|
||||
@ -95,16 +91,13 @@ mod tests {
|
||||
|
||||
// Coincident and parallel planes don't have an intersection curve.
|
||||
assert_eq!(
|
||||
SurfaceSurfaceIntersection::compute(
|
||||
[
|
||||
xy.clone(),
|
||||
xy.clone().transform(
|
||||
&Transform::translation([0., 0., 1.],),
|
||||
&mut services.objects
|
||||
)
|
||||
],
|
||||
&mut services.objects
|
||||
),
|
||||
SurfaceSurfaceIntersection::compute([
|
||||
xy.clone(),
|
||||
xy.clone().transform(
|
||||
&Transform::translation([0., 0., 1.],),
|
||||
&mut services.objects
|
||||
)
|
||||
],),
|
||||
None,
|
||||
);
|
||||
|
||||
@ -112,10 +105,7 @@ mod tests {
|
||||
let expected_xz = SurfacePath::u_axis();
|
||||
|
||||
assert_eq!(
|
||||
SurfaceSurfaceIntersection::compute(
|
||||
[xy, xz],
|
||||
&mut services.objects
|
||||
),
|
||||
SurfaceSurfaceIntersection::compute([xy, xz],),
|
||||
Some(SurfaceSurfaceIntersection {
|
||||
intersection_curves: [expected_xy, expected_xz],
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user