pub struct TerrainComponent {
pub terrain: ObjRef,
pub path: String,
pub world: Matrix,
pub data: ObjRef,
pub material: Option<ObjRef>,
pub draw_heightmap: bool,
pub draw_trees: bool,
pub collider: Option<TerrainColliderComponent>,
pub off: Vec<OffFlag>,
}Expand description
A terrain, whatever its state: its GameObject’s path and world matrix (a terrain is placed by its position only), its data, material, collider and off flags (drawn when empty).
Fields§
§terrain: ObjRefThe Terrain object.
path: StringIts GameObject’s path from the scene root, names joined by /.
world: MatrixIts GameObject’s world matrix.
data: ObjRefm_TerrainData, read with crate::terrain::TerrainData::read.
material: Option<ObjRef>m_MaterialTemplate.
draw_heightmap: boolm_DrawHeightmap.
draw_trees: boolm_DrawTreesAndFoliage.
collider: Option<TerrainColliderComponent>The terrain’s TerrainCollider, if its GameObject has one.
off: Vec<OffFlag>What keeps it from being drawn; drawn when empty.
Trait Implementations§
Source§impl Clone for TerrainComponent
impl Clone for TerrainComponent
Source§impl Debug for TerrainComponent
impl Debug for TerrainComponent
Source§impl PartialEq for TerrainComponent
impl PartialEq for TerrainComponent
impl StructuralPartialEq for TerrainComponent
Auto Trait Implementations§
impl Freeze for TerrainComponent
impl RefUnwindSafe for TerrainComponent
impl Send for TerrainComponent
impl Sync for TerrainComponent
impl Unpin for TerrainComponent
impl UnsafeUnpin for TerrainComponent
impl UnwindSafe for TerrainComponent
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