[−][src]Struct sourcenav::NavArea
A navigation area from the nav file
Fields
id: NavAreaId
north_west: Vector3
south_east: Vector3
north_east_z: f32
south_west_z: f32
flags: u32
connections: Connections
hiding_spots: Vec<NavHidingSpot>
approach_areas: Vec<ApproachArea>
encounter_paths: Vec<EncounterPath>
place: u16
light_intensity: LightIntensity
ladder_connections: LadderConnections
earliest_occupy_first_team: f32
earliest_occupy_second_team: f32
visible_areas: Vec<VisibleArea>
inherit_visibility_from_area_id: u32
Methods
impl NavArea
[src]
pub fn width(&self) -> f32
[src]
pub fn height(&self) -> f32
[src]
pub fn get_z_height(&self, x: f32, y: f32) -> f32
[src]
Get the z height of a x/y point inside the navigation area
Examples
use sourcenav::get_area_tree; let file = std::fs::read("path/to/navfile.nav")?; let tree = get_area_tree(file)?; let area = tree.query(150.0, -312.0).next().unwrap(); let height = area.get_z_height(150.0, -312.0);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NavArea
impl Send for NavArea
impl Sync for NavArea
impl Unpin for NavArea
impl UnwindSafe for NavArea
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,