pub struct CoverageRequest { /* private fields */ }Expand description
A question about one subject: how much of its footprint the sources’ effect areas cover.
Implementations§
Source§impl CoverageRequest
impl CoverageRequest
Sourcepub fn try_new(
subject: ObjectId,
reach: EffectReach,
range_metres: f64,
sources: Vec<Participant>,
blockers: Vec<Participant>,
) -> Result<Self, PlanAreaError>
pub fn try_new( subject: ObjectId, reach: EffectReach, range_metres: f64, sources: Vec<Participant>, blockers: Vec<Participant>, ) -> Result<Self, PlanAreaError>
Coverage of subject by sources, each reaching range_metres as
reach says, travel and sight avoiding blockers.
Sources and blockers are sorted by object; an object listed twice keeps its certain listing.
§Errors
PlanAreaError::Unavailable for a range that is negative or not
finite, or an object that is both subject, source or blocker.
Sourcepub fn with_connections(
self,
connected: Vec<Participant>,
passages: Vec<Participant>,
) -> Result<Self, PlanAreaError>
pub fn with_connections( self, connected: Vec<Participant>, passages: Vec<Participant>, ) -> Result<Self, PlanAreaError>
Continues travel and sight into the connected spaces through the
passages (doors and openings) joining them to the subject: the free
region becomes the union of the subject’s, the connected spaces’ and
the passages’ footprints, less the blockers. A service that cannot
continue effects refuses such a request; it never ignores the
connections.
Both lists are sorted by object; an object listed twice keeps its certain listing.
§Errors
PlanAreaError::Unavailable for a grown reach, which ignores walls
and has nothing to continue through, or a connected space or passage
that is also the subject, a source, a blocker, or both.
Sourcepub fn reach(&self) -> EffectReach
pub fn reach(&self) -> EffectReach
How every source’s effect reaches.
Sourcepub fn range_metres(&self) -> f64
pub fn range_metres(&self) -> f64
How far, in metres.
Sourcepub fn sources(&self) -> &[Participant]
pub fn sources(&self) -> &[Participant]
The sources, sorted by object.
Sourcepub fn blockers(&self) -> &[Participant]
pub fn blockers(&self) -> &[Participant]
The blockers travel and sight avoid, sorted by object.
Sourcepub fn connected(&self) -> &[Participant]
pub fn connected(&self) -> &[Participant]
The spaces effects continue into, sorted by object; empty unless
Self::with_connections added them.
Sourcepub fn passages(&self) -> &[Participant]
pub fn passages(&self) -> &[Participant]
The doors and openings joining the connected spaces to the subject, sorted by object.