jagua_rs/entities/
quality_zone.rsuse std::sync::Arc;
use crate::geometry::primitives::simple_polygon::SimplePolygon;
pub const N_QUALITIES: usize = 10;
#[derive(Clone, Debug)]
pub struct InferiorQualityZone {
pub quality: usize,
pub zones: Vec<Arc<SimplePolygon>>,
}
impl InferiorQualityZone {
pub fn new(quality: usize, shapes: Vec<SimplePolygon>) -> Self {
assert!(
quality < N_QUALITIES,
"Quality must be in range of N_QUALITIES"
);
let zones = shapes.into_iter().map(Arc::new).collect();
Self { quality, zones }
}
}