pub struct I32Polygon { /* private fields */ }Expand description
A compact polygon whose coordinates are scaled integers.
The raycast can convert segment endpoints to f64 in-register or scale the
query once and use integer cross products. Both modes use eight bytes per
stored point.
Implementations§
Source§impl I32Polygon
impl I32Polygon
pub fn new( exterior: Vec<I32Point>, holes: Vec<Vec<I32Point>>, scale: f64, ) -> Self
pub fn new_with_mode( exterior: Vec<I32Point>, holes: Vec<Vec<I32Point>>, scale: f64, raycast_mode: I32RaycastMode, ) -> Self
pub fn contains_point(&self, point: Point) -> bool
pub fn exterior(&self) -> &[I32Point] ⓘ
pub fn holes(&self) -> &[Vec<I32Point>]
pub fn scale(&self) -> f64
Trait Implementations§
Source§impl ContainsPoint<Point> for I32Polygon
impl ContainsPoint<Point> for I32Polygon
fn contains_point(&self, point: Point) -> bool
Auto Trait Implementations§
impl Freeze for I32Polygon
impl RefUnwindSafe for I32Polygon
impl Send for I32Polygon
impl Sync for I32Polygon
impl Unpin for I32Polygon
impl UnsafeUnpin for I32Polygon
impl UnwindSafe for I32Polygon
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