Struct NavPolygon
#[repr(C)]pub struct NavPolygon {
pub vertex_count: u8,
pub vertices: [[f32; 2]; 6],
pub center: [f32; 2],
pub neighbors: [u8; 6],
}Expand description
A single convex polygon in the navigation mesh.
Fields§
§vertex_count: u8Number of vertices (3 to 6).
vertices: [[f32; 2]; 6]Counter-clockwise 2D vertices on XZ plane.
center: [f32; 2]Center centroid [x, z].
neighbors: [u8; 6]Neighbor polygon indices corresponding to each edge (255 = no neighbor / wall).
Trait Implementations§
§fn clone(&self) -> NavPolygon
fn clone(&self) -> NavPolygon
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§fn default() -> NavPolygon
fn default() -> NavPolygon
Returns the “default value” for a type. Read more
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more