Trait plexus::builder::SurfaceBuilder
source · [−]pub trait SurfaceBuilder: ClosedInput {
type Builder: FacetBuilder<Self::Key, Error = Self::Error, Facet = Self::Facet>;
type Key: Copy + Eq + Hash;
type Vertex;
type Facet: Default;
fn facets_with<F, T, E>(&mut self, f: F) -> Result<T, Self::Error>
where
Self::Error: From<E>,
F: FnOnce(&mut Self::Builder) -> Result<T, E>;
fn insert_vertex<T>(&mut self, data: T) -> Result<Self::Key, Self::Error>
where
Self::Vertex: FromGeometry<T>;
}
Required Associated Types
type Builder: FacetBuilder<Self::Key, Error = Self::Error, Facet = Self::Facet>
Vertex key.
Each vertex is associated with a key of this type. This key is used to
reference a given vertex and is required to insert faces with a
FacetBuilder
.
Required Methods
Constructs facets in the surface.
The given function is invoked with a FacetBuilder
, which can be used
to insert facets.
fn insert_vertex<T>(&mut self, data: T) -> Result<Self::Key, Self::Error> where
Self::Vertex: FromGeometry<T>,
fn insert_vertex<T>(&mut self, data: T) -> Result<Self::Key, Self::Error> where
Self::Vertex: FromGeometry<T>,
Inserts a vertex into the surface.
Returns a key that refers to the inserted vertex. This key can be used
to insert facets with a FacetBuilder
.