pub struct GridTransform {
pub origin: DVec3,
pub rotation: DQuat,
}Expand description
f64 world placement of one grid: position + orientation.
origin is the grid’s local-space origin in world coords —
chunk (0, 0, 0)’s (0, 0, 0) voxel maps to
origin + rotation * vec3(0, 0, 0) (i.e. just origin).
Voxel size is fixed at 1 world unit / voxel for v1.
Fields§
§origin: DVec3§rotation: DQuatImplementations§
Trait Implementations§
Source§impl Clone for GridTransform
impl Clone for GridTransform
Source§fn clone(&self) -> GridTransform
fn clone(&self) -> GridTransform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GridTransform
impl Debug for GridTransform
Source§impl Default for GridTransform
impl Default for GridTransform
Source§impl<'de> Deserialize<'de> for GridTransform
impl<'de> Deserialize<'de> for GridTransform
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
Source§impl PartialEq for GridTransform
impl PartialEq for GridTransform
Source§fn eq(&self, other: &GridTransform) -> bool
fn eq(&self, other: &GridTransform) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GridTransform
impl Serialize for GridTransform
impl Copy for GridTransform
impl StructuralPartialEq for GridTransform
Auto Trait Implementations§
impl Freeze for GridTransform
impl RefUnwindSafe for GridTransform
impl Send for GridTransform
impl Sync for GridTransform
impl Unpin for GridTransform
impl UnsafeUnpin for GridTransform
impl UnwindSafe for GridTransform
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more