pub struct OffMeshConnection {
pub pos: [f32; 6],
pub radius: f32,
pub poly: PolyRef,
pub flags: PolyFlags,
pub area: u8,
pub dir: u8,
pub user_id: u32,
}Expand description
Off-mesh connection
Fields§
§pos: [f32; 6]Connection position (start/end) [sx,sy,sz,ex,ey,ez]
radius: f32Connection radius
poly: PolyRefPolygon reference
flags: PolyFlagsFlags
area: u8Area ID
dir: u8Direction (bidir = 0, A->B = 1, B->A = 2)
user_id: u32User ID
Implementations§
Source§impl OffMeshConnection
impl OffMeshConnection
Sourcepub fn new_with_params(
start_pos: [f32; 3],
end_pos: [f32; 3],
radius: f32,
flags: PolyFlags,
area: u8,
dir: u8,
user_id: u32,
) -> Self
pub fn new_with_params( start_pos: [f32; 3], end_pos: [f32; 3], radius: f32, flags: PolyFlags, area: u8, dir: u8, user_id: u32, ) -> Self
Creates a new off-mesh connection with specified parameters
Sourcepub fn is_bidirectional(&self) -> bool
pub fn is_bidirectional(&self) -> bool
Checks if the connection is bidirectional
Sourcepub fn allows_start_to_end(&self) -> bool
pub fn allows_start_to_end(&self) -> bool
Checks if traversal from start to end is allowed
Sourcepub fn allows_end_to_start(&self) -> bool
pub fn allows_end_to_start(&self) -> bool
Checks if traversal from end to start is allowed
Sourcepub fn get_length(&self) -> f32
pub fn get_length(&self) -> f32
Gets the distance between start and end positions
Trait Implementations§
Source§impl Clone for OffMeshConnection
impl Clone for OffMeshConnection
Source§fn clone(&self) -> OffMeshConnection
fn clone(&self) -> OffMeshConnection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OffMeshConnection
impl Debug for OffMeshConnection
Auto Trait Implementations§
impl Freeze for OffMeshConnection
impl RefUnwindSafe for OffMeshConnection
impl Send for OffMeshConnection
impl Sync for OffMeshConnection
impl Unpin for OffMeshConnection
impl UnsafeUnpin for OffMeshConnection
impl UnwindSafe for OffMeshConnection
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