shape_core/elements/polygons/
convert.rs

1use super::*;
2
3impl<T, P> FromIterator<P> for Polygon3D<T>
4where
5    P: Into<Point3D<T>>,
6{
7    fn from_iter<I>(iter: I) -> Self
8    where
9        I: IntoIterator<Item = P>,
10    {
11        Self { vertex: iter.into_iter().map(|p| p.into()).collect() }
12    }
13}