pub struct OffMeshLinkDesc {
pub start: Vec2,
pub end: Vec2,
pub start_poly: NavPolyId,
pub end_poly: NavPolyId,
pub cost: f32,
pub bidirectional: bool,
pub link_type: LinkType,
}Expand description
Description of an off-mesh link to add to a registry.
Groups the parameters for OffMeshLinkRegistry::add_link into a
single struct to keep the API ergonomic.
Fields§
§start: Vec2Start position (world space).
end: Vec2End position (world space).
start_poly: NavPolyIdPolygon containing the start position.
end_poly: NavPolyIdPolygon containing the end position.
cost: f32Traversal cost (added to pathfinding cost). Clamped to >= 0.
bidirectional: boolWhether this link can be traversed in both directions.
link_type: LinkTypeType of traversal.
Trait Implementations§
Source§impl Clone for OffMeshLinkDesc
impl Clone for OffMeshLinkDesc
Source§fn clone(&self) -> OffMeshLinkDesc
fn clone(&self) -> OffMeshLinkDesc
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 OffMeshLinkDesc
impl Debug for OffMeshLinkDesc
Source§impl<'de> Deserialize<'de> for OffMeshLinkDesc
impl<'de> Deserialize<'de> for OffMeshLinkDesc
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OffMeshLinkDesc
impl RefUnwindSafe for OffMeshLinkDesc
impl Send for OffMeshLinkDesc
impl Sync for OffMeshLinkDesc
impl Unpin for OffMeshLinkDesc
impl UnsafeUnpin for OffMeshLinkDesc
impl UnwindSafe for OffMeshLinkDesc
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