Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Uriopass/flat_spatial
/ functions
Functions
78 in github.com/Uriopass/flat_spatial
⨍
Functions
78
◇
Types & classes
15
↓ 24 callers
Method
x
(&self)
src/lib.rs:49
↓ 24 callers
Method
y
(&self)
src/lib.rs:54
↓ 17 callers
Function
black_box
(_x: T)
examples/shapegrid.rs:26
↓ 11 callers
Method
insert
Inserts a new object with a position and an associated object Returns the unique and stable handle to be used with `get_obj`
src/grid.rs:117
↓ 10 callers
Method
cell_id
(&self, pos: V2)
src/storage.rs:68
↓ 9 callers
Method
cell_mut
(&mut self, pos: V2)
src/storage.rs:55
↓ 7 callers
Method
ll
(&self)
src/lib.rs:85
↓ 7 callers
Method
ur
(&self)
src/lib.rs:88
↓ 6 callers
Method
cell_mut_unchecked
(&mut self, id: CellIdx)
src/storage.rs:60
↓ 5 callers
Method
cell
(&self, id: CellIdx)
src/storage.rs:64
↓ 5 callers
Function
cell_range
((min_x, min_y): CellIdx, (max_x, max_y): CellIdx)
src/storage.rs:5
↓ 4 callers
Function
maintain_shapegrid
(s: i32, iter: u64)
examples/storage_bench.rs:236
↓ 4 callers
Function
maintain_sparsegrid
(s: i32, iter: u64)
examples/storage_bench.rs:219
↓ 4 callers
Function
query_5_shapegrid
(g: &AABBGrid<Data, AABB>, iter: u64)
examples/storage_bench.rs:103
↓ 4 callers
Function
query_5_sparsegrid
(g: &Grid<Data, [f32; 2]>, iter: u64)
examples/storage_bench.rs:80
↓ 4 callers
Function
query_setup_shape
(s: i32)
examples/storage_bench.rs:67
↓ 4 callers
Function
query_setup_sparse
(s: i32)
examples/storage_bench.rs:56
↓ 3 callers
Method
get
Returns a reference to the associated object and its position, using the handle. # Example ```rust use flat_spatial::Grid; let mut g: Grid<i32, [f32;
src/grid.rs:283
↓ 3 callers
Method
maintain
Maintains the world, updating all the positions (and moving them to corresponding cells) and removing necessary objects and empty cells. Runs in linea
src/grid.rs:225
↓ 3 callers
Method
query
Queries for all objects in the cells intersecting an axis-aligned rectangle defined by lower left (ll) and upper right (ur) Try to keep the rect's wid
src/grid.rs:355
↓ 3 callers
Method
remove
Lazily removes an object from the grid. This won't be taken into account until maintain() is called. # Example ```rust use flat_spatial::Grid; let mu
src/grid.rs:164
↓ 2 callers
Method
cell_size
(&self)
src/storage.rs:47
↓ 2 callers
Function
cells_apply
( storage: &mut SparseStorage<AABBGridCell>, bbox: &AB, f: impl Fn(&mut AABBGridCell, bool), )
src/aabbgrid.rs:270
↓ 2 callers
Method
get_mut
Returns a mutable reference to the associated object and its position, using the handle. # Example ```rust use flat_spatial::Grid; let mut g: Grid<i3
src/grid.rs:297
↓ 2 callers
Method
insert
Inserts a new object with a position and an associated object Returns the unique and stable handle to be used with `get_obj`
src/aabbgrid.rs:84
↓ 2 callers
Method
intersects
(&self, b: &Self)
src/lib.rs:31
↓ 2 callers
Method
is_empty
Checks if the grid contains objects or not (removals that were not confirmed with maintain() are still counted)
src/grid.rs:391
↓ 2 callers
Method
len
Returns the number of objects currently available (removals that were not confirmed with maintain() are still counted)
src/grid.rs:385
↓ 2 callers
Function
maintain_kdtree_bulk
(iter: u64)
examples/storage_bench.rs:270
↓ 2 callers
Method
modify
(&mut self, mut f: impl FnMut(&mut T) -> bool)
src/storage.rs:51
↓ 2 callers
Function
query_5_kdtree
(tree: &rstar::RTree<Rtreedata>, iter: u64)
examples/storage_bench.rs:129
↓ 2 callers
Method
query_around
(&self, pos: V2, radius: f32)
src/grid.rs:306
↓ 2 callers
Method
query_visitor
query_visitor is similar to query, but uses a visitor function to be slightly more performant.
src/grid.rs:365
↓ 2 callers
Method
set_position
Lazily sets the position of an object (if it is not marked for deletion). This won't be taken into account until maintain() is called.
src/grid.rs:131
↓ 1 callers
Method
get_mut
Returns a mutable reference to the associated object and its position, using the handle.
src/aabbgrid.rs:166
↓ 1 callers
Method
handles
Iterate over all handles
src/grid.rs:265
↓ 1 callers
Method
len
Returns the number of objects currently available
src/aabbgrid.rs:260
↓ 1 callers
Function
maintain_kdbush_bulk
(iter: u64)
examples/storage_bench.rs:287
↓ 1 callers
Function
maintain_kdtree_seq
(iter: u64)
examples/storage_bench.rs:257
↓ 1 callers
Function
query_5_kdbush
(tree: &kdbush::KDBush, iter: u64)
examples/storage_bench.rs:149
↓ 1 callers
Function
query_5_shapegrid
(g: &AABBGrid<Data, Rect<f32, ()>>, iter: u64)
examples/shapegrid.rs:31
↓ 1 callers
Method
query_aabb_visitor
(&self, ll_: V2, ur_: V2, mut visitor: impl FnMut(CellObject<V2>))
src/grid.rs:329
↓ 1 callers
Method
query_broad
Queries for all objects in the cells intersecting the given AABB
src/aabbgrid.rs:189
↓ 1 callers
Method
query_broad_visitor
Queries for all objects in the cells intersecting the given AABB Uses a visitor for slightly better performance.
src/aabbgrid.rs:223
↓ 1 callers
Function
query_setup_shape
(s: i32)
examples/shapegrid.rs:13
↓ 1 callers
Function
update_loop
(g: &mut Grid<Car, [f32; 2]>)
examples/collision_detector.rs:34
Method
clear
Clears the grid.
src/aabbgrid.rs:76
Method
clear
Clear all objects from the grid. Returns the objects and their positions.
src/grid.rs:200
Method
default
()
src/cell.rs:16
Method
envelope
(&self)
examples/storage_bench.rs:51
Method
get
Returns a reference to the associated object and its position, using the handle.
src/aabbgrid.rs:161
Method
handles
Iterate over all handles
src/aabbgrid.rs:151
Method
is_empty
Checks if the grid contains objects or not
src/aabbgrid.rs:265
Method
ll
(&self)
examples/storage_bench.rs:23
Function
main
()
examples/shapegrid.rs:45
Function
main
()
examples/basic_example.rs:1
Function
main
()
examples/collision_detector.rs:10
Function
main
()
examples/storage_bench.rs:330
Function
maintain
(c: &mut Criterion)
examples/storage_bench.rs:301
Method
maintain
( &mut self, objects: &mut GridObjects<T, V2>, to_relocate: &mut Vec<CellObject<V2>>,
src/cell.rs:32
Method
maintain_deterministic
Same as maintain() but deterministic by sorting the relocations
src/grid.rs:244
Method
new
Creates an empty grid. The cell size should be about the same magnitude as your queries size.
src/aabbgrid.rs:68
Method
new
Creates an empty grid. The cell size should be about the same magnitude as your queries size.
src/grid.rs:106
Method
new
(cell_size: i32)
src/storage.rs:35
Method
next
(&mut self)
src/aabbgrid.rs:290
Method
next
(&mut self)
src/storage.rs:88
Method
objects
Iterate over all objects
src/aabbgrid.rs:156
Method
objects
Iterate over all objects
src/grid.rs:270
Function
query
(c: &mut Criterion)
examples/storage_bench.rs:171
Method
query
Queries for objects intersecting a given AABB.
src/aabbgrid.rs:176
Method
query_aabb
(&self, ll_: V2, ur_: V2)
src/grid.rs:319
Method
query_visitor
Queries for objects intersecting a given AABB. Uses a visitor for slightly better performance.
src/aabbgrid.rs:211
Method
remove
Removes an object from the grid.
src/aabbgrid.rs:134
Method
remove_maintain
Directly removes an object from the grid. This is equivalent to remove() then maintain() but is much faster (O(1)) # Example ```rust use flat_spatial
src/grid.rs:183
Method
set_aabb
Updates the aabb of an object.
src/aabbgrid.rs:97
Method
storage
The underlying storage
src/aabbgrid.rs:171
Method
storage
The underlying storage
src/grid.rs:302
Method
ur
(&self)
examples/storage_bench.rs:27