Struct CollisionIndex

Source
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: f64

Implementations§

Source§

impl CollisionIndex

Source

pub fn new(transform_state: &ViewState, map_mode: MapMode) -> Self

maplibre/maplibre-native#4add9ea original name: new

Source

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

Source

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)
where F: Fn(&IndexedSubfeature) -> bool,

maplibre/maplibre-native#4add9ea original name: placeFeature

Source

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

Source

pub fn query_rendered_symbols( &self, line_string: &LineString, ) -> HashMap<u32, Vec<IndexedSubfeature>>

maplibre/maplibre-native#4add9ea original name: queryRenderedSymbols

Source

pub fn project_tile_boundaries( &self, pos_matrix: &ModelViewProjection, ) -> Box2D<f64, ScreenSpace>

maplibre/maplibre-native#4add9ea original name: projectTileBoundaries

Source

pub fn get_transform_state(&self) -> &ViewState

maplibre/maplibre-native#4add9ea original name: getTransformState

Source

pub fn get_viewport_padding(&self) -> f64

maplibre/maplibre-native#4add9ea original name: getViewportPadding

Source§

impl CollisionIndex

Source

fn is_offscreen(&self, boundaries: &Box2D<f64, ScreenSpace>) -> bool

maplibre/maplibre-native#4add9ea original name: isOffscreen

Source

fn is_inside_grid(&self, boundaries: &Box2D<f64, ScreenSpace>) -> bool

maplibre/maplibre-native#4add9ea original name: isInsideGrid

Source

fn is_inside_tile( &self, boundaries: &Box2D<f64, ScreenSpace>, tile_boundaries: &Box2D<f64, ScreenSpace>, ) -> bool

maplibre/maplibre-native#4add9ea original name: isInsideTile

Source

fn overlaps_tile( &self, boundaries: &Box2D<f64, ScreenSpace>, tile_boundaries: &Box2D<f64, ScreenSpace>, ) -> bool

maplibre/maplibre-native#4add9ea original name: overlapsTile

Source

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)
where F: Fn(&IndexedSubfeature) -> bool,

maplibre/maplibre-native#4add9ea original name: placeLineFeature

Source

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

Source

fn project_anchor( &self, pos_matrix: &ModelViewProjection, point: &Point2D<f64, TileSpace>, ) -> (f64, f64)

maplibre/maplibre-native#4add9ea original name: projectAnchor

Source

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

Source

fn project_point( &self, pos_matrix: &ModelViewProjection, point: &Point2D<f64, TileSpace>, ) -> Point2D<f64, ScreenSpace>

maplibre/maplibre-native#4add9ea original name: projectPoint

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool

Source§

impl<T> Resource for T
where T: 'static,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,