pub trait CycleBuilder {
    // Required methods
    fn add_half_edge(
        &mut self,
        objects: &mut Service<Objects>
    ) -> Partial<HalfEdge>;
    fn update_as_polygon_from_points<O, P>(
        &mut self,
        points: O,
        objects: &mut Service<Objects>
    ) -> O::SameSize<Partial<HalfEdge>>
       where O: ObjectArgument<P>,
             P: Into<Point<2>>;
    fn connect_to_closed_edges<O>(
        &mut self,
        edges: O,
        surface: &SurfaceGeometry,
        objects: &mut Service<Objects>
    ) -> O::SameSize<Partial<HalfEdge>>
       where O: ObjectArgument<Partial<HalfEdge>>;
}
Expand description

Builder API for PartialCycle

Required Methods§

source

fn add_half_edge(&mut self, objects: &mut Service<Objects>) -> Partial<HalfEdge>

Add a new half-edge to the cycle

Creates a half-edge and adds it to the cycle. The new half-edge is connected to the front vertex of the last half-edge , and the back vertex of the first edge, making sure the half-edges actually form a cycle.

If this is the first half-edge being added, it is connected to itself, meaning its front and back vertices are the same.

source

fn update_as_polygon_from_points<O, P>( &mut self, points: O, objects: &mut Service<Objects> ) -> O::SameSize<Partial<HalfEdge>>where O: ObjectArgument<P>, P: Into<Point<2>>,

Update cycle as a polygon from the provided points

source

fn connect_to_closed_edges<O>( &mut self, edges: O, surface: &SurfaceGeometry, objects: &mut Service<Objects> ) -> O::SameSize<Partial<HalfEdge>>where O: ObjectArgument<Partial<HalfEdge>>,

Connect the cycles to the provided half-edges

Assumes that the provided half-edges, once translated into local equivalents of this cycle, form a cycle themselves.

Returns the local equivalents of the provided half-edges.

Implementors§