Struct Heightfield

Source
pub struct Heightfield { /* private fields */ }

Implementations§

Source§

impl Heightfield

Source

pub fn new( context: &mut Context, min_bounds: Vec3<f32>, max_bounds: Vec3<f32>, cell_horizontal_size: f32, cell_height: f32, ) -> Result<Self, ()>

Source

pub fn grid_width(&self) -> i32

Source

pub fn grid_height(&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 spans_len(&self) -> usize

Source

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

Source

pub fn span(&self, index: usize) -> Option<HeightfieldSpan<'_>>

Source

pub fn span_by_grid( &self, grid_x: i32, grid_y: i32, ) -> Option<HeightfieldSpan<'_>>

Source

pub fn rasterize_triangles( &mut self, context: &mut Context, vertices: &[Vec3<f32>], area_ids: &[u8], flag_merge_threshold: i32, ) -> Result<(), ()>

Source

pub unsafe fn rasterize_indexed_triangles_u16_unchecked( &mut self, context: &mut Context, vertices: &[Vec3<f32>], triangles: &[Vec3<u16>], area_ids: &[u8], flag_merge_threshold: i32, ) -> Result<(), ()>

Source

pub unsafe fn rasterize_indexed_triangles_i32_unchecked( &mut self, context: &mut Context, vertices: &[Vec3<f32>], triangles: &[Vec3<i32>], area_ids: &[u8], flag_merge_threshold: i32, ) -> Result<(), ()>

Source

pub fn rasterize_indexed_triangles_u16( &mut self, context: &mut Context, vertices: &[Vec3<f32>], triangles: &[Vec3<u16>], area_ids: &[u8], flag_merge_threshold: i32, ) -> Result<(), ()>

Source

pub fn rasterize_indexed_triangles_i32( &mut self, context: &mut Context, vertices: &[Vec3<f32>], triangles: &[Vec3<i32>], area_ids: &[u8], flag_merge_threshold: i32, ) -> Result<(), ()>

Source

pub fn filter_low_hanging_walkable_obstacles( &mut self, context: &mut Context, walkable_climb: i32, )

Source

pub fn filter_ledge_spans( &mut self, context: &mut Context, walkable_height: i32, walkable_climb: i32, )

Source

pub fn filter_walkable_low_height_spans( &mut self, context: &mut Context, walkable_height: i32, )

Auto Trait Implementations§

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.