Skip to main content

Piece

Trait Piece 

Source
pub trait Piece: Sized {
    type At: Clone;

    // Required methods
    fn hull(&self) -> GeopResult<Vec<Vector3>>;
    fn point(&self) -> GeopResult<Option<(Self::At, Vector3)>>;
    fn split(&self, handoff: Scalar) -> GeopResult<Option<Vec<Self>>>;
}
Expand description

Part of a set a distance is measured to (see the module docs).

Required Associated Types§

Source

type At: Clone

Where on the whole a point of the piece is: its parameters, say.

Required Methods§

Source

fn hull(&self) -> GeopResult<Vec<Vector3>>

Points whose convex hull holds every point of the piece.

Source

fn point(&self) -> GeopResult<Option<(Self::At, Vector3)>>

A point of the piece and where it is — if one is known to belong to the set: a patch of a trimmed face may hold none of the face.

Source

fn split(&self, handoff: Scalar) -> GeopResult<Option<Vec<Self>>>

What is left of the piece cut in two — a half known to hold nothing of the set left out — or None once it is within handoff in size.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§