pub struct StorageGeometry<'a, 'b> {
pub town: &'a TownView<'b>,
pub sectors: &'a mut SectorGraph,
pub ground: &'a dyn Fn(i32) -> [f32; 3],
}Expand description
The geometry called by the town’s storage search. Uses the same sector cache as the AI.
Fields§
§town: &'a TownView<'b>A view of the town.
sectors: &'a mut SectorGraphThe sector graph.
ground: &'a dyn Fn(i32) -> [f32; 3]The ground point of a cell.
Trait Implementations§
Source§impl StorageSearchMap for StorageGeometry<'_, '_>
impl StorageSearchMap for StorageGeometry<'_, '_>
Source§fn rank(&mut self, a: i32, b: i32) -> i32
fn rank(&mut self, a: i32, b: i32) -> i32
FUN_140008830: path rank, or map width plus truncated Euclidean cell distance.
Source§fn market_position(
&mut self,
entity: usize,
from: i32,
rng: &mut Random,
) -> Option<(i32, [f32; 3])>
fn market_position( &mut self, entity: usize, from: i32, rng: &mut Random, ) -> Option<(i32, [f32; 3])>
Port of FUN_14004f710: draw a use point (including Rand(1)), then test reachability.
Auto Trait Implementations§
impl<'a, 'b> !RefUnwindSafe for StorageGeometry<'a, 'b>
impl<'a, 'b> !Send for StorageGeometry<'a, 'b>
impl<'a, 'b> !Sync for StorageGeometry<'a, 'b>
impl<'a, 'b> !UnwindSafe for StorageGeometry<'a, 'b>
impl<'a, 'b> Freeze for StorageGeometry<'a, 'b>
impl<'a, 'b> Unpin for StorageGeometry<'a, 'b>
impl<'a, 'b> UnsafeUnpin for StorageGeometry<'a, 'b>
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