pub struct CollisionIndex {
transform_state: ViewState,
viewport_padding: f64,
collision_grid: GridIndex<IndexedSubfeature>,
ignored_grid: GridIndex<IndexedSubfeature>,
screen_right_boundary: f64,
screen_bottom_boundary: f64,
grid_right_boundary: f64,
grid_bottom_boundary: f64,
pitch_factor: f64,
}Expand description
maplibre/maplibre-native#4add9ea original name: CollisionIndex
Fields§
§transform_state: ViewState§viewport_padding: f64§collision_grid: GridIndex<IndexedSubfeature>§ignored_grid: GridIndex<IndexedSubfeature>§screen_right_boundary: f64§screen_bottom_boundary: f64§grid_right_boundary: f64§grid_bottom_boundary: f64§pitch_factor: f64Implementations§
Source§impl CollisionIndex
impl CollisionIndex
Sourcepub fn new(transform_state: &ViewState, map_mode: MapMode) -> Self
pub fn new(transform_state: &ViewState, map_mode: MapMode) -> Self
maplibre/maplibre-native#4add9ea original name: new
Sourcepub fn intersects_tile_edges(
&self,
box_: &CollisionBox,
shift: Point2D<f64, ScreenSpace>,
pos_matrix: &ModelViewProjection,
text_pixel_ratio: f64,
tile_edges: Box2D<f64, ScreenSpace>,
) -> IntersectStatus
pub fn intersects_tile_edges( &self, box_: &CollisionBox, shift: Point2D<f64, ScreenSpace>, pos_matrix: &ModelViewProjection, text_pixel_ratio: f64, tile_edges: Box2D<f64, ScreenSpace>, ) -> IntersectStatus
maplibre/maplibre-native#4add9ea original name: intersectsTileEdges
Sourcepub fn place_feature<F>(
&self,
feature: &CollisionFeature,
shift: Point2D<f64, ScreenSpace>,
pos_matrix: &ModelViewProjection,
label_plane_matrix: &Matrix4<f64>,
text_pixel_ratio: f64,
symbol: &PlacedSymbol,
scale: f64,
font_size: f64,
allow_overlap: bool,
pitch_with_map: bool,
collision_debug: bool,
avoid_edges: Option<Box2D<f64, ScreenSpace>>,
collision_group_predicate: Option<F>,
projected_boxes: &mut Vec<ProjectedCollisionBox>,
) -> (bool, bool)
pub fn place_feature<F>( &self, feature: &CollisionFeature, shift: Point2D<f64, ScreenSpace>, pos_matrix: &ModelViewProjection, label_plane_matrix: &Matrix4<f64>, text_pixel_ratio: f64, symbol: &PlacedSymbol, scale: f64, font_size: f64, allow_overlap: bool, pitch_with_map: bool, collision_debug: bool, avoid_edges: Option<Box2D<f64, ScreenSpace>>, collision_group_predicate: Option<F>, projected_boxes: &mut Vec<ProjectedCollisionBox>, ) -> (bool, bool)
maplibre/maplibre-native#4add9ea original name: placeFeature
Sourcepub fn insert_feature(
&mut self,
feature: CollisionFeature,
projected_boxes: &Vec<ProjectedCollisionBox>,
ignore_placement: bool,
bucket_instance_id: u32,
collision_group_id: u16,
)
pub fn insert_feature( &mut self, feature: CollisionFeature, projected_boxes: &Vec<ProjectedCollisionBox>, ignore_placement: bool, bucket_instance_id: u32, collision_group_id: u16, )
maplibre/maplibre-native#4add9ea original name: insertFeature
Sourcepub fn query_rendered_symbols(
&self,
line_string: &LineString,
) -> HashMap<u32, Vec<IndexedSubfeature>>
pub fn query_rendered_symbols( &self, line_string: &LineString, ) -> HashMap<u32, Vec<IndexedSubfeature>>
maplibre/maplibre-native#4add9ea original name: queryRenderedSymbols
Sourcepub fn project_tile_boundaries(
&self,
pos_matrix: &ModelViewProjection,
) -> Box2D<f64, ScreenSpace>
pub fn project_tile_boundaries( &self, pos_matrix: &ModelViewProjection, ) -> Box2D<f64, ScreenSpace>
maplibre/maplibre-native#4add9ea original name: projectTileBoundaries
Sourcepub fn get_transform_state(&self) -> &ViewState
pub fn get_transform_state(&self) -> &ViewState
maplibre/maplibre-native#4add9ea original name: getTransformState
Sourcepub fn get_viewport_padding(&self) -> f64
pub fn get_viewport_padding(&self) -> f64
maplibre/maplibre-native#4add9ea original name: getViewportPadding
Source§impl CollisionIndex
impl CollisionIndex
Sourcefn is_offscreen(&self, boundaries: &Box2D<f64, ScreenSpace>) -> bool
fn is_offscreen(&self, boundaries: &Box2D<f64, ScreenSpace>) -> bool
maplibre/maplibre-native#4add9ea original name: isOffscreen
Sourcefn is_inside_grid(&self, boundaries: &Box2D<f64, ScreenSpace>) -> bool
fn is_inside_grid(&self, boundaries: &Box2D<f64, ScreenSpace>) -> bool
maplibre/maplibre-native#4add9ea original name: isInsideGrid
Sourcefn is_inside_tile(
&self,
boundaries: &Box2D<f64, ScreenSpace>,
tile_boundaries: &Box2D<f64, ScreenSpace>,
) -> bool
fn is_inside_tile( &self, boundaries: &Box2D<f64, ScreenSpace>, tile_boundaries: &Box2D<f64, ScreenSpace>, ) -> bool
maplibre/maplibre-native#4add9ea original name: isInsideTile
Sourcefn overlaps_tile(
&self,
boundaries: &Box2D<f64, ScreenSpace>,
tile_boundaries: &Box2D<f64, ScreenSpace>,
) -> bool
fn overlaps_tile( &self, boundaries: &Box2D<f64, ScreenSpace>, tile_boundaries: &Box2D<f64, ScreenSpace>, ) -> bool
maplibre/maplibre-native#4add9ea original name: overlapsTile
Sourcefn place_line_feature<F>(
&self,
feature: &CollisionFeature,
pos_matrix: &ModelViewProjection,
label_plane_matrix: &Matrix4<f64>,
text_pixel_ratio: f64,
symbol: &PlacedSymbol,
scale: f64,
font_size: f64,
allow_overlap: bool,
pitch_with_map: bool,
collision_debug: bool,
avoid_edges: Option<Box2D<f64, ScreenSpace>>,
collision_group_predicate: Option<F>,
projected_boxes: &mut Vec<ProjectedCollisionBox>,
) -> (bool, bool)
fn place_line_feature<F>( &self, feature: &CollisionFeature, pos_matrix: &ModelViewProjection, label_plane_matrix: &Matrix4<f64>, text_pixel_ratio: f64, symbol: &PlacedSymbol, scale: f64, font_size: f64, allow_overlap: bool, pitch_with_map: bool, collision_debug: bool, avoid_edges: Option<Box2D<f64, ScreenSpace>>, collision_group_predicate: Option<F>, projected_boxes: &mut Vec<ProjectedCollisionBox>, ) -> (bool, bool)
maplibre/maplibre-native#4add9ea original name: placeLineFeature
Sourcefn approximate_tile_distance(
&self,
tile_distance: &TileDistance,
last_segment_angle: f64,
pixels_to_tile_units: f64,
camera_to_anchor_distance: f64,
pitch_with_map: bool,
) -> f64
fn approximate_tile_distance( &self, tile_distance: &TileDistance, last_segment_angle: f64, pixels_to_tile_units: f64, camera_to_anchor_distance: f64, pitch_with_map: bool, ) -> f64
maplibre/maplibre-native#4add9ea original name: approximateTileDistance
Sourcefn project_anchor(
&self,
pos_matrix: &ModelViewProjection,
point: &Point2D<f64, TileSpace>,
) -> (f64, f64)
fn project_anchor( &self, pos_matrix: &ModelViewProjection, point: &Point2D<f64, TileSpace>, ) -> (f64, f64)
maplibre/maplibre-native#4add9ea original name: projectAnchor
Sourcefn project_and_get_perspective_ratio(
&self,
pos_matrix: &ModelViewProjection,
point: &Point2D<f64, TileSpace>,
) -> (Point2D<f64, ScreenSpace>, f64)
fn project_and_get_perspective_ratio( &self, pos_matrix: &ModelViewProjection, point: &Point2D<f64, TileSpace>, ) -> (Point2D<f64, ScreenSpace>, f64)
maplibre/maplibre-native#4add9ea original name: projectAndGetPerspectiveRatio
Sourcefn project_point(
&self,
pos_matrix: &ModelViewProjection,
point: &Point2D<f64, TileSpace>,
) -> Point2D<f64, ScreenSpace>
fn project_point( &self, pos_matrix: &ModelViewProjection, point: &Point2D<f64, TileSpace>, ) -> Point2D<f64, ScreenSpace>
maplibre/maplibre-native#4add9ea original name: projectPoint
Sourcefn get_projected_collision_boundaries(
&self,
pos_matrix: &ModelViewProjection,
shift: Point2D<f64, ScreenSpace>,
text_pixel_ratio: f64,
box_: &CollisionBox,
) -> Box2D<f64, ScreenSpace>
fn get_projected_collision_boundaries( &self, pos_matrix: &ModelViewProjection, shift: Point2D<f64, ScreenSpace>, text_pixel_ratio: f64, box_: &CollisionBox, ) -> Box2D<f64, ScreenSpace>
maplibre/maplibre-native#4add9ea original name: getProjectedCollisionBoundaries
Auto Trait Implementations§
impl Freeze for CollisionIndex
impl RefUnwindSafe for CollisionIndex
impl Send for CollisionIndex
impl Sync for CollisionIndex
impl Unpin for CollisionIndex
impl UnwindSafe for CollisionIndex
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more