#[repr(C)]pub struct MapFrameInfo {
pub header: Header,
pub origin: [f64; 2],
pub size: [f64; 2],
pub metres_per_cell: f64,
}Expand description
The frame of the map of the scene the server runs, as
HostApi::map_frame writes it: where the
map starts and how far it reaches, in metres on the world’s x and z.
§Examples
use enshwick::abi::MapFrameInfo;
let frame = MapFrameInfo { size: [10240.0; 2], metres_per_cell: 8.0, ..MapFrameInfo::EMPTY };
assert_eq!(frame.size[0] / frame.metres_per_cell, 1280.0);Fields§
§header: HeaderSize and version of this struct.
origin: [f64; 2]The map’s corner of lowest x and z, in metres, x then z.
size: [f64; 2]How far the map reaches from origin, in metres, x then z.
metres_per_cell: f64The metres one cell of the game’s map covers on each axis.
Implementations§
Source§impl MapFrameInfo
impl MapFrameInfo
Trait Implementations§
Source§impl Clone for MapFrameInfo
impl Clone for MapFrameInfo
impl Copy for MapFrameInfo
Source§impl Debug for MapFrameInfo
impl Debug for MapFrameInfo
impl Headed for MapFrameInfo
Auto Trait Implementations§
impl Freeze for MapFrameInfo
impl RefUnwindSafe for MapFrameInfo
impl Send for MapFrameInfo
impl Sync for MapFrameInfo
impl Unpin for MapFrameInfo
impl UnsafeUnpin for MapFrameInfo
impl UnwindSafe for MapFrameInfo
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