Wireframe

Trait Wireframe 

Source
pub trait Wireframe {
    // Required method
    fn wireframe_points<E>(&self, output: &mut E)
       where E: Extend<LineVertex>;
}
Expand description

Geometric objects that can be drawn as wireframes.

Required Methods§

Source

fn wireframe_points<E>(&self, output: &mut E)
where E: Extend<LineVertex>,

Represent this object as a line drawing, or wireframe.

The generated points should be in pairs, each pair defining a line segment. If there are an odd number of vertices, the caller should ignore the last.

Design note: This method accepts a destination to write to, rather than returning an iterator, because if it did return an iterator, it would be difficult to compose in ways like allocating a temporary Wireframe and delegating to that, if it borrowed its input, and would risk composing a very large yet unnecessary iterator struct if it owned its input. This way, composition is simply calling further functions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§