[−][src]Struct sourcenav::NavQuadTree
A tree of all navigation areas
Methods
impl NavQuadTree
[src]
pub fn query(&self, x: f32, y: f32) -> impl Iterator<Item = &NavQuad>
[src]
Find the navigation areas at a x/y cooordinate
Examples
use sourcenav::get_quad_tree; let file = std::fs::read("path/to/navfile.nav")?; let tree = get_quad_tree(file)?; let areas = tree.query(150.0, -312.0);
pub fn find_z_height<'a>(
&'a self,
x: f32,
y: f32
) -> impl Iterator<Item = f32> + 'a
[src]
&'a self,
x: f32,
y: f32
) -> impl Iterator<Item = f32> + 'a
Find the z-height of a specfic x/y cooordinate
Note that multiple heights might exist for a given x/y coooridnate
Examples
use sourcenav::get_quad_tree; let file = std::fs::read("path/to/navfile.nav")?; let tree = get_quad_tree(file)?; let heights = tree.find_z_height(150.0, -312.0);
pub fn find_best_height(&self, x: f32, y: f32, z_guess: f32) -> f32
[src]
Get the z height at a point
A z-guess should be provided to resolve cases where multiple z values are possible
pub fn quads(&self) -> impl Iterator<Item = &NavQuad>
[src]
Get all navigation areas from the nav file
Examples
use sourcenav::get_quad_tree; let file = std::fs::read("path/to/navfile.nav")?; let tree = get_quad_tree(file)?; for quad in tree.quads() { println!("area: {:?}", quad) }
Auto Trait Implementations
impl RefUnwindSafe for NavQuadTree
impl Send for NavQuadTree
impl Sync for NavQuadTree
impl Unpin for NavQuadTree
impl UnwindSafe for NavQuadTree
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>,