pub struct GpuMesh {Show 14 fields
pub vertex_buffer: Buffer,
pub index_buffer: Buffer,
pub index_count: u32,
pub edge_index_buffer: Buffer,
pub edge_index_count: u32,
pub normal_line_buffer: Option<Buffer>,
pub normal_line_count: u32,
pub object_uniform_buf: Buffer,
pub object_bind_group: BindGroup,
pub attribute_buffers: HashMap<String, Buffer>,
pub attribute_ranges: HashMap<String, (f32, f32)>,
pub normal_uniform_buf: Buffer,
pub normal_bind_group: BindGroup,
pub aabb: Aabb,
/* private fields */
}Expand description
GPU buffers and bind group for a single mesh.
Fields§
§vertex_buffer: BufferInterleaved position + normal vertex buffer (Vertex layout).
index_buffer: BufferTriangle index buffer (for solid rendering).
index_count: u32Number of indices in the triangle index buffer.
edge_index_buffer: BufferEdge index buffer (deduplicated pairs, for wireframe LineList rendering).
edge_index_count: u32Number of indices in the edge index buffer.
normal_line_buffer: Option<Buffer>Vertex buffer for per-vertex normal visualization lines (LineList topology). Each normal contributes two vertices: the vertex position and position + normal * 0.1. None if no normal data is available.
normal_line_count: u32Number of vertices in the normal line buffer (2 per normal line).
object_uniform_buf: BufferPer-object uniform buffer (model matrix, material, selection state).
object_bind_group: BindGroupBind group (group 1) combining object_uniform_buf with texture views.
Texture views are the fallback 1×1 textures by default; rebuilt when material
texture assignment changes (tracked via last_tex_key).
attribute_buffers: HashMap<String, Buffer>Per-named-attribute GPU storage buffers (f32 per vertex, STORAGE usage).
attribute_ranges: HashMap<String, (f32, f32)>Scalar range (min, max) per attribute, computed at upload time.
normal_uniform_buf: BufferUniform buffer for normal-line rendering: always has selected=0, wireframe=0. Updated each frame in prepare() with the object’s model matrix only.
normal_bind_group: BindGroupBind group referencing normal_uniform_buf — used when drawing normal lines.
aabb: AabbLocal-space axis-aligned bounding box computed from vertex positions at upload time.
Auto Trait Implementations§
impl Freeze for GpuMesh
impl !RefUnwindSafe for GpuMesh
impl Send for GpuMesh
impl Sync for GpuMesh
impl Unpin for GpuMesh
impl UnsafeUnpin for GpuMesh
impl !UnwindSafe for GpuMesh
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.