pub struct IndexedGeometry {
pub positions: Vec<f32>,
pub indices: Vec<u32>,
}Expand description
索引化三角形网格输入(位置为紧凑 XYZ,f32)。
Fields§
§positions: Vec<f32>紧凑 XYZ 顶点位置,长度为 3 的倍数。
indices: Vec<u32>三角形索引,长度为 3 的倍数,取值必须落在顶点范围内。
Implementations§
Source§impl IndexedGeometry
impl IndexedGeometry
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
顶点数(positions 元素数 / 3)。
Sourcepub fn triangle_count(&self) -> usize
pub fn triangle_count(&self) -> usize
三角形数(indices 元素数 / 3)。
Trait Implementations§
Source§impl Clone for IndexedGeometry
impl Clone for IndexedGeometry
Auto Trait Implementations§
impl Freeze for IndexedGeometry
impl RefUnwindSafe for IndexedGeometry
impl Send for IndexedGeometry
impl Sync for IndexedGeometry
impl Unpin for IndexedGeometry
impl UnsafeUnpin for IndexedGeometry
impl UnwindSafe for IndexedGeometry
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