pub struct TreeInstance {
pub position: [f32; 3],
pub width_scale: f32,
pub height_scale: f32,
pub rotation: f32,
pub color: u32,
pub prototype: usize,
}Expand description
A tree placed on a terrain: position as 0..1 of the terrain’s size, scales, rotation about y (radians), colour, and its prototype’s index.
Fields§
§position: [f32; 3]Position as 0 to 1 of the terrain’s size along each axis.
width_scale: f32widthScale.
height_scale: f32heightScale.
rotation: f32Rotation about the y axis, in radians.
color: u32The tint, packed as stored (color.rgba).
prototype: usizeIndex into TerrainData::tree_prototypes.
Trait Implementations§
Source§impl Clone for TreeInstance
impl Clone for TreeInstance
Source§impl Debug for TreeInstance
impl Debug for TreeInstance
Source§impl PartialEq for TreeInstance
impl PartialEq for TreeInstance
impl StructuralPartialEq for TreeInstance
Auto Trait Implementations§
impl Freeze for TreeInstance
impl RefUnwindSafe for TreeInstance
impl Send for TreeInstance
impl Sync for TreeInstance
impl Unpin for TreeInstance
impl UnsafeUnpin for TreeInstance
impl UnwindSafe for TreeInstance
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