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: f32Relative position X in world orientation
y: f32Relative position Y in world orientation
r: f32Segment radius
dir: f32Direction angle relative to your heading (range -π to +π)
dist: f32Distance between the center of your head and the segment’s center
idx: u32Segment number starting from head (idx == 0)
bot_id: u64Bot ID
is_self: boolTrue 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