Skip to main content

I32Polygon

Type Alias I32Polygon 

Source
pub type I32Polygon = Polygon<i32>;
Expand description

A compact polygon whose coordinates are scaled integers.

This is Polygon with i32 storage: eight bytes per stored point, with full support for the acceleration indexes in PolygonBuildOptions.

Aliased Type§

pub struct I32Polygon { /* private fields */ }

Implementations§

Source§

impl I32Polygon

Source

pub fn new_with_mode( exterior: Vec<I32Point>, holes: Vec<Vec<I32Point>>, scale: f64, raycast_mode: I32RaycastMode, ) -> Self

Create a polygon from scaled integer coordinates with no acceleration index.

(There is intentionally no I32Polygon::new: a second inherent new would make plain Polygon::new(...) calls ambiguous.)

Source

pub fn new_with_options( exterior: Vec<I32Point>, holes: Vec<Vec<I32Point>>, scale: f64, raycast_mode: I32RaycastMode, options: Option<PolygonBuildOptions>, ) -> Self

Create a polygon from scaled integer coordinates with explicit build options; the acceleration indexes operate directly in the scaled integer storage space. The indexes only serve the default (float) raycast; I32RaycastMode::Integer always scans segments linearly.