Struct bevy_vox_scene::VoxelModel
source · pub struct VoxelModel {
pub name: String,
pub mesh: Handle<Mesh>,
pub material: Handle<StandardMaterial>,
/* private fields */
}
Expand description
Contains the voxel data for a model, as well as handles to the mesh derived from that data and the material
Fields§
§name: String
Unique name of the model
mesh: Handle<Mesh>
Handle to the model’s mesh
material: Handle<StandardMaterial>
Handle to the model’s material
Trait Implementations§
source§impl Clone for VoxelModel
impl Clone for VoxelModel
source§fn clone(&self) -> VoxelModel
fn clone(&self) -> VoxelModel
Returns a copy of the value. Read more
1.0.0 · 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 VoxelModel
impl Debug for VoxelModel
source§impl Default for VoxelModel
impl Default for VoxelModel
source§fn default() -> VoxelModel
fn default() -> VoxelModel
Returns the “default value” for a type. Read more
source§impl VoxelQueryable for VoxelModel
impl VoxelQueryable for VoxelModel
source§fn global_point_to_voxel_space(
&self,
global_point: Vec3,
global_xform: &GlobalTransform
) -> IVec3
fn global_point_to_voxel_space( &self, global_point: Vec3, global_xform: &GlobalTransform ) -> IVec3
Converts a global point to a point in voxel coordinates Read more
source§fn local_point_to_voxel_space(&self, local_point: Vec3) -> IVec3
fn local_point_to_voxel_space(&self, local_point: Vec3) -> IVec3
Converts a local point to a point in voxel coordinates Read more
source§fn point_in_model(&self, point: IVec3) -> Result<UVec3, OutOfBoundsError>
fn point_in_model(&self, point: IVec3) -> Result<UVec3, OutOfBoundsError>
If the voxel-space
point
is within the bounds of the model, it will be returned as a bevy::math::UVec3
.Auto Trait Implementations§
impl !RefUnwindSafe for VoxelModel
impl Send for VoxelModel
impl Sync for VoxelModel
impl Unpin for VoxelModel
impl !UnwindSafe for VoxelModel
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].