#[non_exhaustive]pub struct PrimitiveMeasurements {
pub primitive_index: usize,
pub material_index: Option<usize>,
pub vertex_count: u64,
pub finite_vertex_count: u64,
pub geometry_aabb: Option<Aabb>,
pub geometry_centroid: Option<[f32; 3]>,
}Expand description
Static base-geometry measurements of one source mesh primitive.
Position rows are measured exactly as decoded by the loader. Indexed primitives therefore count each stored position once, rather than counting index references.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.primitive_index: usizeZero-based position in the owning mesh’s source primitive array, or retained primitive order when the normalized document has no source primitive identity.
material_index: Option<usize>Stable source material index, when the primitive declares one.
vertex_count: u64Number of decoded base POSITION rows, including non-finite rows.
finite_vertex_count: u64Number of decoded base POSITION rows whose coordinates are finite.
geometry_aabb: Option<Aabb>Bounding box over finite base POSITION rows.
geometry_centroid: Option<[f32; 3]>Arithmetic mean of finite base POSITION rows.
Trait Implementations§
Source§impl Clone for PrimitiveMeasurements
impl Clone for PrimitiveMeasurements
Source§fn clone(&self) -> PrimitiveMeasurements
fn clone(&self) -> PrimitiveMeasurements
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PrimitiveMeasurements
impl Debug for PrimitiveMeasurements
Source§impl<'de> Deserialize<'de> for PrimitiveMeasurements
impl<'de> Deserialize<'de> for PrimitiveMeasurements
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PrimitiveMeasurements
impl RefUnwindSafe for PrimitiveMeasurements
impl Send for PrimitiveMeasurements
impl Sync for PrimitiveMeasurements
impl Unpin for PrimitiveMeasurements
impl UnsafeUnpin for PrimitiveMeasurements
impl UnwindSafe for PrimitiveMeasurements
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