Struct CompactHeightfield

Source
pub struct CompactHeightfield<TypeState: CompactHeightfieldState> { /* private fields */ }

Implementations§

Source§

impl<TypeState: CompactHeightfieldState> CompactHeightfield<TypeState>

Source

pub fn grid_width(&self) -> i32

Source

pub fn grid_height(&self) -> i32

Source

pub fn walkable_height(&self) -> i32

Source

pub fn walkable_climb(&self) -> i32

Source

pub fn min_bounds(&self) -> Vec3<f32>

Source

pub fn max_bounds(&self) -> Vec3<f32>

Source

pub fn cell_horizontal_size(&self) -> f32

Source

pub fn cell_height(&self) -> f32

Source

pub fn cells_iter(&self) -> impl Iterator<Item = Range<usize>> + '_

Source

pub fn cell(&self, index: usize) -> Range<usize>

Source

pub fn spans_len(&self) -> usize

Source

pub fn spans_iter( &self, ) -> impl Iterator<Item = CompactSpan<'_, TypeState>> + '_

Source

pub fn span_areas(&self) -> &[u8]

Source§

impl CompactHeightfield<NoRegions>

Source

pub fn new( heightfield: &Heightfield, context: &mut Context, walkable_height: i32, walkable_climb: i32, ) -> Result<Self, ()>

Source

pub fn erode_walkable_area( &mut self, context: &mut Context, radius: i32, ) -> Result<(), ()>

Source

pub fn mark_box_area_with_id( &mut self, context: &mut Context, min_bounds: Vec3<f32>, max_bounds: Vec3<f32>, new_id: u8, )

Source

pub fn mark_cylinder_area_with_id( &mut self, context: &mut Context, position: Vec3<f32>, radius: f32, height: f32, new_id: u8, )

Source

pub fn mark_convex_poly_area_with_id( &mut self, context: &mut Context, vertices: &[Vec3<f32>], base_height: f32, top_height: f32, new_id: u8, )

Source

pub fn median_filter_area_ids( &mut self, context: &mut Context, ) -> Result<(), ()>

Source

pub fn build_regions( self, context: &mut Context, border_size: i32, min_region_area: i32, merge_region_area: i32, ) -> Result<CompactHeightfield<HasRegions>, ()>

Source

pub fn build_layer_regions( self, context: &mut Context, border_size: i32, min_region_area: i32, ) -> Result<CompactHeightfield<HasRegions>, ()>

Source

pub fn build_regions_monotone( self, context: &mut Context, border_size: i32, min_region_area: i32, merge_region_area: i32, ) -> Result<CompactHeightfield<HasRegions>, ()>

Source§

impl CompactHeightfield<HasRegions>

Source

pub fn border_size(&self) -> i32

Source

pub fn max_region_id(&self) -> u16

Source

pub fn max_distance(&self) -> u16

Auto Trait Implementations§

§

impl<TypeState> Freeze for CompactHeightfield<TypeState>

§

impl<TypeState> RefUnwindSafe for CompactHeightfield<TypeState>
where TypeState: RefUnwindSafe,

§

impl<TypeState> Send for CompactHeightfield<TypeState>
where TypeState: Send,

§

impl<TypeState> !Sync for CompactHeightfield<TypeState>

§

impl<TypeState> Unpin for CompactHeightfield<TypeState>
where TypeState: Unpin,

§

impl<TypeState> UnwindSafe for CompactHeightfield<TypeState>
where TypeState: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.