DtNavMesh

Struct DtNavMesh 

Source
pub struct DtNavMesh(/* private fields */);

Implementations§

Source§

impl DtNavMesh

Source

pub fn new() -> DtNavMesh

Source

pub fn as_ptr(&self) -> *const dtNavMesh

Source

pub fn as_mut_ptr(&mut self) -> *mut dtNavMesh

Source

pub fn with_params(params: &DtNavMeshParams) -> Result<DtNavMesh, XError>

Source

pub fn with_data(buf: DtBuf) -> Result<DtNavMesh, XError>

Source

pub fn params(&self) -> &DtNavMeshParams

Source

pub fn add_tile( &mut self, buf: DtBuf, last_ref: DtTileRef, ) -> Result<DtTileRef, XError>

Source

pub fn remove_tile(&mut self, re: DtTileRef) -> Result<(), XError>

Source

pub fn calc_tile_loc(&self, pos: &[f32; 3]) -> [i32; 2]

Source

pub fn get_tile_at(&self, x: i32, y: i32, layer: i32) -> Option<&DtMeshTile>

Source

pub fn get_tiles_at<'a, 'b: 'a>( &'b self, x: i32, y: i32, tiles: &mut [Option<&'a DtMeshTile>], ) -> usize

Source

pub fn get_tile_ref_at(&self, x: i32, y: i32, layer: i32) -> DtTileRef

Source

pub fn get_tile_ref(&self, tile: &DtMeshTile) -> DtTileRef

Source

pub fn get_tile_by_ref(&self, re: DtTileRef) -> Option<&DtMeshTile>

Source

pub fn max_tiles(&self) -> i32

Source

pub fn get_tile(&self, i: i32) -> Option<&DtMeshTile>

Source

pub fn get_tile_and_poly_by_ref( &self, re: DtPolyRef, ) -> Result<(&DtMeshTile, &DtPoly), XError>

Source

pub unsafe fn get_tile_and_poly_by_ref_unsafe( &self, re: DtPolyRef, ) -> (&DtMeshTile, &DtPoly)

Source

pub fn is_valid_poly_ref(&self, re: DtPolyRef) -> bool

Source

pub unsafe fn get_poly_ref_base(&self, tile: &DtMeshTile) -> DtPolyRef

Source

pub fn get_off_mesh_connection_poly_end_points( &self, prev_ref: DtPolyRef, poly_ref: DtPolyRef, ) -> Result<([f32; 3], [f32; 3]), XError>

Source

pub fn get_off_mesh_connection_by_ref( &self, re: DtPolyRef, ) -> &DtOffMeshConnection

Source

pub fn set_poly_flags( &mut self, re: DtPolyRef, flags: u16, ) -> Result<(), XError>

Source

pub fn get_poly_flags(&self, re: DtPolyRef) -> Result<u16, XError>

Source

pub fn set_poly_area(&mut self, re: DtPolyRef, area: u8) -> Result<(), XError>

Source

pub fn get_poly_area(&self, re: DtPolyRef) -> Result<u8, XError>

Source

pub unsafe fn get_tile_state_size(&self, tile: &DtMeshTile) -> usize

Source

pub unsafe fn store_tile_state( &self, re: DtTileRef, data: &mut [u8], ) -> Result<(), XError>

Source

pub unsafe fn restore_tile_state( &mut self, re: DtTileRef, data: &[u8], ) -> Result<(), XError>

Source

pub fn encode_poly_id(&self, salt: u32, it: u32, ip: u32) -> DtPolyRef

Source

pub unsafe fn decode_poly_id(&self, re: DtPolyRef) -> (u32, u32, u32)

Source

pub fn decode_poly_id_salt(&self, re: DtPolyRef) -> u32

Source

pub fn decode_poly_id_tile(&self, re: DtPolyRef) -> u32

Source

pub fn decode_poly_id_poly(&self, re: DtPolyRef) -> u32

Trait Implementations§

Source§

impl Debug for DtNavMesh

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for DtNavMesh

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
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> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
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.