pub trait HalfEdgeBuilder {
    // Required methods
    fn replace_surface(&mut self, surface: impl Into<Partial<Surface>>);
    fn update_as_circle_from_radius(&mut self, radius: impl Into<Scalar>);
    fn update_as_arc(&mut self, angle_rad: impl Into<Scalar>);
    fn update_as_line_segment_from_points(
&mut self,
surface: impl Into<Partial<Surface>>,
points: [impl Into<Point<2>>; 2]
); fn update_as_line_segment(&mut self); fn infer_global_form(&mut self) -> Partial<GlobalEdge>; fn update_from_other_edge(&mut self, other: &Partial<HalfEdge>); }
Expand description

Builder API for PartialHalfEdge

Required Methods§

source

fn replace_surface(&mut self, surface: impl Into<Partial<Surface>>)

Completely replace the surface in this half-edge’s object graph

Please note that this operation will write to both vertices that the half-edge references. If any of them were created from full objects, this will break the connection to those, meaning that building the partial objects won’t result in those full objects again. This will be the case, even if those full objects already referenced the provided surface.

source

fn update_as_circle_from_radius(&mut self, radius: impl Into<Scalar>)

Update partial half-edge to be a circle, from the given radius

source

fn update_as_arc(&mut self, angle_rad: impl Into<Scalar>)

Update partial half-edge to be an arc, spanning the given angle in radians

Panics

Panics if the given angle is not within the range (-2pi, 2pi) radians.

source

fn update_as_line_segment_from_points(
&mut self,
surface: impl Into<Partial<Surface>>,
points: [impl Into<Point<2>>; 2]
)

Update partial half-edge to be a line segment, from the given points

source

fn update_as_line_segment(&mut self)

Update partial half-edge to be a line segment

source

fn infer_global_form(&mut self) -> Partial<GlobalEdge>

Infer the global form of the half-edge

Updates the global form referenced by this half-edge, and also returns it.

source

fn update_from_other_edge(&mut self, other: &Partial<HalfEdge>)

Update this edge from another

Infers as much information about this edge from the other, under the assumption that the other edge is on a different surface.

Implementors§