Struct fast_surface_nets::SurfaceNetsBuffer
source · [−]pub struct SurfaceNetsBuffer {
pub positions: Vec<[f32; 3]>,
pub normals: Vec<[f32; 3]>,
pub indices: Vec<u32>,
pub surface_points: Vec<[u32; 3]>,
pub surface_strides: Vec<u32>,
pub stride_to_index: Vec<u32>,
}Expand description
The output buffers used by surface_nets. These buffers can be reused to avoid reallocating memory.
Fields
positions: Vec<[f32; 3]>The triangle mesh positions.
These are in array-local coordinates, i.e. at array position (x, y, z), the vertex position would be (x, y, z) + centroid if the isosurface intersects that voxel.
normals: Vec<[f32; 3]>The triangle mesh normals.
The normals are not normalized, since that is done most efficiently on the GPU.
indices: Vec<u32>The triangle mesh indices.
surface_points: Vec<[u32; 3]>Local 3D array coordinates of every voxel that intersects the isosurface.
surface_strides: Vec<u32>Stride of every voxel that intersects the isosurface. Can be used for efficient post-processing.
stride_to_index: Vec<u32>Used to map back from voxel stride to vertex index.
Trait Implementations
sourceimpl Default for SurfaceNetsBuffer
impl Default for SurfaceNetsBuffer
sourcefn default() -> SurfaceNetsBuffer
fn default() -> SurfaceNetsBuffer
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for SurfaceNetsBuffer
impl Send for SurfaceNetsBuffer
impl Sync for SurfaceNetsBuffer
impl Unpin for SurfaceNetsBuffer
impl UnwindSafe for SurfaceNetsBuffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more