MCPcopy Create free account

hub / github.com/bonsairobo/fast-surface-nets-rs / functions

Functions31 in github.com/bonsairobo/fast-surface-nets-rs

↓ 8 callersFunctionsurface_nets
The Naive Surface Nets smooth voxel meshing algorithm. Extracts an isosurface mesh from the [signed distance field](https://en.wikipedia.org/wiki/Sig
src/lib.rs:126
↓ 3 callersMethodis_negative
(self)
src/lib.rs:59
↓ 3 callersFunctionmaybe_make_quad
( sdf: &[T], stride_to_index: &[u32], positions: &[[f32; 3]], p1: usize, p2: usize, ax
src/lib.rs:377
↓ 3 callersFunctionsdf_to_mesh
( meshes: &mut Assets<Mesh>, sdf: impl Fn(Vec3A) -> f32, )
examples-crate/render/main.rs:80
↓ 3 callersFunctionspawn_pbr
( commands: &mut Commands, materials: &mut Assets<StandardMaterial>, mesh: Handle<Mesh>, trans
examples-crate/render/main.rs:115
↓ 3 callersFunctionwrite_mesh_to_obj_file
(name: String, buffer: &SurfaceNetsBuffer)
examples-crate/render/main.rs:132
↓ 2 callersFunctioninto_domain
(array_dim: u32, [x, y, z]: [u32; 3])
bench/src/bench.rs:90
↓ 1 callersFunctioncentroid_of_edge_intersections
(dists: &[f32; 8])
src/lib.rs:217
↓ 1 callersFunctioncube
(b: Vec3A, p: Vec3A)
examples-crate/render/main.rs:189
↓ 1 callersFunctionestimate_surface
Find all vertex positions and normals. Also generate a map from grid position to vertex index to be used to look up vertices when generating quads.
src/lib.rs:149
↓ 1 callersFunctionestimate_surface_edge_intersection
Given two cube corners, find the point between them where the SDF is zero. (This might not exist).
src/lib.rs:233
↓ 1 callersFunctionestimate_surface_in_cube
Consider the grid-aligned cube where `p` is the minimal corner. Find a point inside this cube that is approximately on the isosurface. This is done b
src/lib.rs:181
↓ 1 callersFunctiongenerate_and_process_chunk
Generate the data of a single chunk by merging the sdf value (of the shapes intersecting the chunk) with a simple .min() function.
examples-crate/rayon-chunks/main.rs:140
↓ 1 callersFunctiongenerate_chunks
Generate some example data and then spawn off rayon thread tasks, one for each chunk
examples-crate/rayon-chunks/main.rs:217
↓ 1 callersFunctioninto_domain
(array_dim: u32, [x, y, z]: [u32; 3])
examples-crate/render/main.rs:181
↓ 1 callersFunctionlink
(le: f32, r1: f32, r2: f32, p: Vec3A)
examples-crate/render/main.rs:194
↓ 1 callersFunctionmake_all_quads
For every edge that crosses the isosurface, make a quad between the "centers" of the four cubes touching that surface. The "centers" are actually the
src/lib.rs:282
↓ 1 callersMethodreset
Clears all of the buffers, but keeps the memory allocated for reuse.
src/lib.rs:89
↓ 1 callersFunctionsdf_gradient
Calculate the normal as the gradient of the distance field. Don't bother making it a unit vector, since we'll do that on the GPU. For each dimension,
src/lib.rs:251
↓ 1 callersFunctionsine_sdf
The higher the frequency (n) the more surface area to mesh.
bench/src/bench.rs:78
↓ 1 callersFunctionsphere
(radius: f32, p: Vec3A)
examples-crate/render/main.rs:185
↓ 1 callersFunctionsphere_sdf
([x, y, z]: [f32; 3])
bench/src/bench.rs:84
↓ 1 callersFunctionwrite_mesh_to_obj_file
Convert the content of the buffers to obj_exporter format, write the result to file
examples-crate/rayon-chunks/main.rs:23
Functionbench_empty_space
(c: &mut Criterion)
bench/src/bench.rs:9
Functionbench_sine_sdf
(c: &mut Criterion)
bench/src/bench.rs:28
Functionbench_sphere
(c: &mut Criterion)
bench/src/bench.rs:51
Methodfrom
(d: Sd8)
bench/src/bench.rs:107
Methodis_negative
(self)
bench/src/bench.rs:119
Functionmain
()
examples-crate/rayon-chunks/main.rs:267
Functionmain
()
examples-crate/render/main.rs:16
Functionsetup
( mut commands: Commands, mut wireframe_config: ResMut<WireframeConfig>, mut materials: ResMut<Ass
examples-crate/render/main.rs:29