olson-sean-k / plexus

Polygonal mesh processing.
https://plexus.rs
MIT License
159 stars 13 forks source link

Remove the `Attribute` trait. #26

Closed olson-sean-k closed 5 years ago

olson-sean-k commented 5 years ago

The Geometry trait is used to specify the geometric attributes associated with topological structures in a MeshGraph:

pub trait Geometry {
    type Vertex: Attribute;
    type Arc: Attribute + Default;
    type Edge: Attribute + Default;
    type Face: Attribute + Default;
}

Each associated type requires the Attribute trait. This trait provides no methods and only requires Clone. This trait should be removed, because it provides virtually no functionality and disallows users from using types outside of their own crate as attributes due to coherence rules. For example, this test uses f32 for face geometry and could not be written outside of the Plexus crate, because it would not be possible to implement Attribute for f32.

olson-sean-k commented 5 years ago

This is fixed by 3923737.