1
2
3
4
5
6
7
8
9
10
11
12
13
use super::*;

impl<T, P> FromIterator<P> for Polygon3D<T>
where
    P: Into<Point3D<T>>,
{
    fn from_iter<I>(iter: I) -> Self
    where
        I: IntoIterator<Item = P>,
    {
        Self { vertex: iter.into_iter().map(|p| p.into()).collect() }
    }
}