mirror of https://github.com/hannobraun/Fornjot
Remove redundant access to point surface coords
This commit is contained in:
parent
bff0d20f83
commit
e1edb64c6f
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue