Remove redundant access to point surface coords

This commit is contained in:
Hanno Braun 2022-02-20 13:34:01 +01:00
parent bff0d20f83
commit e1edb64c6f
3 changed files with 3 additions and 15 deletions

View File

@ -33,7 +33,7 @@ impl Swept {
/// Convert a point in surface coordinates to model coordinates /// Convert a point in surface coordinates to model coordinates
pub fn point_surface_to_model(&self, point: &Point<2>) -> Point<3> { pub fn point_surface_to_model(&self, point: &Point<2>) -> Point<3> {
self.curve.point_curve_to_model(&point.to_t()) + self.path * point.v() self.curve.point_curve_to_model(&point.to_t()) + self.path * point.v
} }
/// Convert a vector in surface coordinates to model coordinates /// Convert a vector in surface coordinates to model coordinates

View File

@ -40,8 +40,8 @@ impl HasPosition for SurfacePoint {
fn position(&self) -> spade::Point2<Self::Scalar> { fn position(&self) -> spade::Point2<Self::Scalar> {
spade::Point2 { spade::Point2 {
x: self.value.u(), x: self.value.u,
y: self.value.v(), y: self.value.v,
} }
} }
} }

View File

@ -60,18 +60,6 @@ impl Point<1> {
} }
} }
impl Point<2> {
/// Access the point's x coordinate
pub fn u(&self) -> Scalar {
self.coords.u
}
/// Access the point's y coordinate
pub fn v(&self) -> Scalar {
self.coords.v
}
}
impl ops::Deref for Point<1> { impl ops::Deref for Point<1> {
type Target = T; type Target = T;