Struct spn_rust_bot::api::ipc::IpcSegmentInfo
source · [−]#[repr(C)]#[repr(align(4))]pub struct IpcSegmentInfo {
pub x: f32,
pub y: f32,
pub r: f32,
pub dir: f32,
pub dist: f32,
pub idx: u32,
pub bot_id: u64,
pub is_self: bool,
}
Expand description
IPC representation of a snake segment.
Fields
x: f32
Relative position X in world orientation
y: f32
Relative position Y in world orientation
r: f32
Segment radius
dir: f32
Direction angle relative to your heading (range -π to +π)
dist: f32
Distance between the center of your head and the segment’s center
idx: u32
Segment number starting from head (idx == 0)
bot_id: u64
Bot ID
is_self: bool
True if this segment belongs to ones own snake
Auto Trait Implementations
impl RefUnwindSafe for IpcSegmentInfo
impl Send for IpcSegmentInfo
impl Sync for IpcSegmentInfo
impl Unpin for IpcSegmentInfo
impl UnwindSafe for IpcSegmentInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more