Struct libfj::robocraft::Cube [−][src]
pub struct Cube { pub id: u32, pub x: u8, pub y: u8, pub z: u8, pub orientation: u8, pub colour: u8, }
A single block in a Robocraft robot.
From the front of a Robocraft garage bay, looking at the back, all positions are measured from the back bottom right corner.
Fields
id: u32
The cube id
x: u8
The cube’s x position (left to right)
y: u8
The cube’s y position (bottom to top)
z: u8
The cube’s z position (back to front)
orientation: u8
The cube’s orientation
colour: u8
The cube’s colour, one of the 24 possible colours in Robocraft
Implementations
impl Cube
[src]
impl Cube
[src]pub fn dump_cube_data(&self) -> [u8; 8]
[src]
pub fn dump_cube_data(&self) -> [u8; 8]
[src]Dump the raw cube data as used in the Robocraft CRF.
This is useless by itself, use Cubes.dump()
for a valid robot.
pub fn dump_colour_data(&self) -> [u8; 4]
[src]
pub fn dump_colour_data(&self) -> [u8; 4]
[src]Dump the raw colour data as used in the Robocraft CRF.
This is useless by itself, use Cubes.dump()
for a valid robot.
Trait Implementations
impl Copy for Cube
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cube
impl Send for Cube
impl Sync for Cube
impl Unpin for Cube
impl UnwindSafe for Cube
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more