Skip to content

Commit

Permalink
fix facedegenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Nov 7, 2024
1 parent f7acdf8 commit 6a98432
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/query/epa/epa2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use num::Bounded;

use crate::math::{Isometry, Point, Real, Vector};
use crate::query::gjk::{self, CSOPoint, ConstantOrigin, VoronoiSimplex};
use crate::query::FaceDegenerate;
use crate::shape::SupportMap;
use crate::utils;

Expand Down Expand Up @@ -49,14 +50,10 @@ impl Ord for FaceId {
}
}

/// Represents a degenerate [`Face`] normal.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Degenerate;

#[derive(Clone, Debug)]
struct Face {
pts: [usize; 2],
normal: Result<Unit<Vector<Real>>, Degenerate>,
normal: Result<Unit<Vector<Real>>, FaceDegenerate>,
proj: Point<Real>,
bcoords: [Real; 2],
deleted: bool,
Expand Down Expand Up @@ -90,7 +87,7 @@ impl Face {
normal = Ok(n);
deleted = false;
} else {
normal = Err(Degenerate);
normal = Err(FaceDegenerate);
deleted = true;
}

Expand Down Expand Up @@ -165,7 +162,7 @@ impl EPA {
) -> Option<(
Point<Real>,
Point<Real>,
Result<Unit<Vector<Real>>, Degenerate>,
Result<Unit<Vector<Real>>, FaceDegenerate>,
)>
where
G1: ?Sized + SupportMap,
Expand Down

0 comments on commit 6a98432

Please sign in to comment.