mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 20:08:30 +00:00
Move method to restore alphabetical order
This commit is contained in:
parent
0d25b1e463
commit
04575bb941
@ -14,6 +14,25 @@ use crate::{
|
|||||||
///
|
///
|
||||||
/// [module-level documentation]: super
|
/// [module-level documentation]: super
|
||||||
pub trait BuildSurface {
|
pub trait BuildSurface {
|
||||||
|
/// Build a plane from the provided `u` and `v`
|
||||||
|
fn from_uv(
|
||||||
|
u: impl Into<GlobalPath>,
|
||||||
|
v: impl Into<Vector<3>>,
|
||||||
|
core: &mut Core,
|
||||||
|
) -> Handle<Surface> {
|
||||||
|
let surface = Surface::new().insert(core);
|
||||||
|
|
||||||
|
core.layers.geometry.define_surface(
|
||||||
|
surface.clone(),
|
||||||
|
SurfaceGeom {
|
||||||
|
u: u.into(),
|
||||||
|
v: v.into(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
surface
|
||||||
|
}
|
||||||
|
|
||||||
/// Build a plane from the provided points
|
/// Build a plane from the provided points
|
||||||
fn plane_from_points(
|
fn plane_from_points(
|
||||||
points: [impl Into<Point<3>>; 3],
|
points: [impl Into<Point<3>>; 3],
|
||||||
@ -36,25 +55,6 @@ pub trait BuildSurface {
|
|||||||
|
|
||||||
(surface, points_surface)
|
(surface, points_surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build a plane from the provided `u` and `v`
|
|
||||||
fn from_uv(
|
|
||||||
u: impl Into<GlobalPath>,
|
|
||||||
v: impl Into<Vector<3>>,
|
|
||||||
core: &mut Core,
|
|
||||||
) -> Handle<Surface> {
|
|
||||||
let surface = Surface::new().insert(core);
|
|
||||||
|
|
||||||
core.layers.geometry.define_surface(
|
|
||||||
surface.clone(),
|
|
||||||
SurfaceGeom {
|
|
||||||
u: u.into(),
|
|
||||||
v: v.into(),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
surface
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BuildSurface for Surface {}
|
impl BuildSurface for Surface {}
|
||||||
|
Loading…
Reference in New Issue
Block a user