1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use super::ToPolyline; use crate::procedural; use crate::procedural::Polyline; use crate::shape::Cuboid; use alga::general::RealField; use na; impl<N: RealField> ToPolyline<N> for Cuboid<N> { type DiscretizationParameter = (); fn to_polyline(&self, _: ()) -> Polyline<N> { let _2: N = na::convert(2.0f64); procedural::rectangle(&(*self.half_extents() * _2)) } }