pub struct PlacementRequest { /* private fields */ }Expand description
Searches an object-grounded scope for any placement of a clearance shape.
Implementations§
Source§impl PlacementRequest
impl PlacementRequest
pub fn new( scope: ObjectId, shape: PlacementShape, obstacles: Vec<ObjectId>, ) -> Self
pub fn new_in_domain( scope: ObjectId, shape: PlacementShape, obstacles: Vec<ObjectId>, domain: PlacementDomain, ) -> Result<Self, FreeSpaceError>
Sourcepub fn with_band(self, band: ElevationBand) -> Self
pub fn with_band(self, band: ElevationBand) -> Self
Counts obstacles only inside band above the scope’s floor.
Sourcepub fn with_merged_scopes(
self,
merged: Vec<ObjectId>,
) -> Result<Self, FreeSpaceError>
pub fn with_merged_scopes( self, merged: Vec<ObjectId>, ) -> Result<Self, FreeSpaceError>
Searches the union of the scope and merged scopes, such as the
spaces of one group. The witness stays grounded on the scope. A merged
scope must be neither the scope nor an obstacle.
Sourcepub fn with_swept_doors(
self,
swept: Vec<SweptDoor>,
) -> Result<Self, FreeSpaceError>
pub fn with_swept_doors( self, swept: Vec<SweptDoor>, ) -> Result<Self, FreeSpaceError>
Counts the sectors swept doors sweep as obstacles (see
SweptDoor): a witness must stay clear of their circumscribed
polygons, a proof of absence holds against their inscribed ones.
§Errors
FreeSpaceError::ConflictingSweptDoors when one door is given
twice with different sectors.
Sourcepub fn with_entrance_reach(self, reach: EntranceReach) -> Self
pub fn with_entrance_reach(self, reach: EntranceReach) -> Self
Requires the placement to be reached from reach’s entrances (see
EntranceReach). The entrances are walked through: they leave the
obstacles, and their swings the swept doors.
Sourcepub fn entrance_reach(&self) -> Option<&EntranceReach>
pub fn entrance_reach(&self) -> Option<&EntranceReach>
The entrances the placement must be reached from, if any.
Sourcepub fn swept_doors(&self) -> &[SweptDoor]
pub fn swept_doors(&self) -> &[SweptDoor]
The doors whose swept sectors are obstacles, sorted by door.
pub fn scope(&self) -> &ObjectId
pub fn shape(&self) -> &PlacementShape
pub fn obstacles(&self) -> &[ObjectId]
pub fn domain(&self) -> &PlacementDomain
Sourcepub fn band(&self) -> Option<ElevationBand>
pub fn band(&self) -> Option<ElevationBand>
The band the request states, if any.
Sourcepub fn effective_band(&self) -> ElevationBand
pub fn effective_band(&self) -> ElevationBand
The band obstacles count in: the stated one, or from the floor up by the shape’s height.
Sourcepub fn merged_scopes(&self) -> &[ObjectId]
pub fn merged_scopes(&self) -> &[ObjectId]
Scopes searched together with the scope, sorted.