pub struct ExtractedMesh {
pub transform: AffineTransform,
pub cpu_mesh_uuid: AssetUUID,
pub gpu_mesh: AssetHandle<GpuMesh>,
pub material: Option<AssetHandle<Box<dyn Material>>>,
}Expand description
A flat, GPU-friendly representation of a single mesh to be rendered.
This struct contains all the necessary information, copied from various ECS components, required to issue a draw call for a mesh.
Fields§
§transform: AffineTransformThe world-space transformation matrix of the mesh, derived from GlobalTransform.
cpu_mesh_uuid: AssetUUIDThe UUID of the loaded CPU Mesh. Used for debugging or mapping.
gpu_mesh: AssetHandle<GpuMesh>A handle to the uploaded GPU mesh data.
material: Option<AssetHandle<Box<dyn Material>>>A handle to the material to be used for rendering.
If None, a default material should be used.
Auto Trait Implementations§
impl Freeze for ExtractedMesh
impl !RefUnwindSafe for ExtractedMesh
impl Send for ExtractedMesh
impl Sync for ExtractedMesh
impl Unpin for ExtractedMesh
impl !UnwindSafe for ExtractedMesh
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> 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