pub struct SightRequest { /* private fields */ }Expand description
A question about one target: is any part of it in view from eye?
Implementations§
Source§impl SightRequest
impl SightRequest
Sourcepub fn try_new(
eye: [f64; 3],
target: ObjectId,
blockers: Vec<ObjectId>,
within: Option<f64>,
) -> Result<Self, SightError>
pub fn try_new( eye: [f64; 3], target: ObjectId, blockers: Vec<ObjectId>, within: Option<f64>, ) -> Result<Self, SightError>
A line of sight from eye (canonical metres, the source’s coordinate
system) to target, past blockers, which are sorted and
deduplicated.
With within, the service measures the distance first and does not
look at a target surely farther than that from the eye.
§Errors
SightError::InvalidRequest for a non-finite eye, a range that is
negative or not finite, or a target among its blockers.
Sourcepub fn within_metres(&self) -> Option<f64>
pub fn within_metres(&self) -> Option<f64>
The range beyond which the target is not looked at.
Trait Implementations§
Source§impl Clone for SightRequest
impl Clone for SightRequest
Source§impl Debug for SightRequest
impl Debug for SightRequest
Source§impl PartialEq for SightRequest
impl PartialEq for SightRequest
impl StructuralPartialEq for SightRequest
Auto Trait Implementations§
impl Freeze for SightRequest
impl RefUnwindSafe for SightRequest
impl Send for SightRequest
impl Sync for SightRequest
impl Unpin for SightRequest
impl UnsafeUnpin for SightRequest
impl UnwindSafe for SightRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more