pub struct Floors {
pub counts: Vec<u8>,
pub meshes: BTreeMap<usize, Floor>,
/* private fields */
}Expand description
The map’s floors: per cell how many floors cover it and every floor’s mesh with its transform (the map’s picking scene, map).
Fields§
§counts: Vec<u8>How many floors cover each cell.
meshes: BTreeMap<usize, Floor>Every floor’s mesh with its transform, by entity.
Implementations§
Source§impl Floors
impl Floors
Sourcepub fn add(&mut self, size: usize, entity: usize, floor: Floor)
pub fn add(&mut self, size: usize, entity: usize, floor: Floor)
A floor that was added goes first; every cell of the rectangle counts one more and the mesh joins the scene.
Original: FUN_140124860.
Sourcepub fn remove(&mut self, size: usize, entity: usize)
pub fn remove(&mut self, size: usize, entity: usize)
The rectangle counts one less and the mesh leaves.
Original: FUN_140124770, FUN_1400a2070.
Sourcepub fn ground(
&self,
size: usize,
terrain: &HeightGrid<'_>,
x: f32,
y: f32,
) -> f32
pub fn ground( &self, size: usize, terrain: &HeightGrid<'_>, x: f32, y: f32, ) -> f32
The ground under (x, y): the terrain, or, on a cell with a floor, the nearest floor that
a ray from 50 above hits, when it is above the terrain.
Original: FUN_1400a48b0(point, skip floors = false).
Sourcepub fn ground_normal(
&self,
size: usize,
terrain: &HeightGrid<'_>,
x: f32,
y: f32,
normal: &mut [f32; 3],
) -> f32
pub fn ground_normal( &self, size: usize, terrain: &HeightGrid<'_>, x: f32, y: f32, normal: &mut [f32; 3], ) -> f32
As Floors::ground, with the normal there (param_5): the terrain’s, or on a floor
the hit triangle’s turned back into the map (Intersect’s last accepted hit).