pub trait Feature:
Display
+ DynClone
+ Debug {
// Required methods
fn name(&self) -> &'static str;
fn translate(&mut self, v: Coordinate<f64>);
fn edge_union(&self) -> Option<MultiPolygon<f64>>;
fn interior(&self) -> Vec<InnerAtom>;
// Provided method
fn edge_subtract(&self) -> Option<MultiPolygon<f64>> { ... }
}
Expand description
A top-level unit that makes up the geometry of the panel.
Required Methods§
Sourcefn translate(&mut self, v: Coordinate<f64>)
fn translate(&mut self, v: Coordinate<f64>)
Adjust all coordinates by the specified amount. Should
affect all geometries returned from Feature::edge_union
,
Feature::edge_subtract
, and Feature::interior
.
Sourcefn edge_union(&self) -> Option<MultiPolygon<f64>>
fn edge_union(&self) -> Option<MultiPolygon<f64>>
Returns the outer geometry describing the boundaries of the panel, which should be unioned with the outer geometry of all other features.
Provided Methods§
Sourcefn edge_subtract(&self) -> Option<MultiPolygon<f64>>
fn edge_subtract(&self) -> Option<MultiPolygon<f64>>
Returns the outer geometry describing the boundaries of the panel, which should be subtracted from the outer geometry of all other features.
Trait Implementations§
Source§impl<'a> Feature for Box<dyn Feature + 'a>
impl<'a> Feature for Box<dyn Feature + 'a>
Source§fn translate(&mut self, v: Coordinate<f64>)
fn translate(&mut self, v: Coordinate<f64>)
Adjust all coordinates by the specified amount. Should
affect all geometries returned from
Feature::edge_union
,
Feature::edge_subtract
, and Feature::interior
.Source§fn edge_union(&self) -> Option<MultiPolygon<f64>>
fn edge_union(&self) -> Option<MultiPolygon<f64>>
Returns the outer geometry describing the boundaries of the
panel, which should be unioned with the outer geometry of all
other features.
Source§fn interior(&self) -> Vec<InnerAtom>
fn interior(&self) -> Vec<InnerAtom>
Returns the inner geometry describing features on the panel,
within the bounds of the computed edge geometry.
Source§fn edge_subtract(&self) -> Option<MultiPolygon<f64>>
fn edge_subtract(&self) -> Option<MultiPolygon<f64>>
Returns the outer geometry describing the boundaries of the
panel, which should be subtracted from the outer geometry of all
other features.