Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bonsairobo/fast-surface-nets-rs
/ functions
Functions
31 in github.com/bonsairobo/fast-surface-nets-rs
⨍
Functions
31
◇
Types & classes
4
↓ 8 callers
Function
surface_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 callers
Method
is_negative
(self)
src/lib.rs:59
↓ 3 callers
Function
maybe_make_quad
( sdf: &[T], stride_to_index: &[u32], positions: &[[f32; 3]], p1: usize, p2: usize, ax
src/lib.rs:377
↓ 3 callers
Function
sdf_to_mesh
( meshes: &mut Assets<Mesh>, sdf: impl Fn(Vec3A) -> f32, )
examples-crate/render/main.rs:80
↓ 3 callers
Function
spawn_pbr
( commands: &mut Commands, materials: &mut Assets<StandardMaterial>, mesh: Handle<Mesh>, trans
examples-crate/render/main.rs:115
↓ 3 callers
Function
write_mesh_to_obj_file
(name: String, buffer: &SurfaceNetsBuffer)
examples-crate/render/main.rs:132
↓ 2 callers
Function
into_domain
(array_dim: u32, [x, y, z]: [u32; 3])
bench/src/bench.rs:90
↓ 1 callers
Function
centroid_of_edge_intersections
(dists: &[f32; 8])
src/lib.rs:217
↓ 1 callers
Function
cube
(b: Vec3A, p: Vec3A)
examples-crate/render/main.rs:189
↓ 1 callers
Function
estimate_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 callers
Function
estimate_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 callers
Function
estimate_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 callers
Function
generate_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 callers
Function
generate_chunks
Generate some example data and then spawn off rayon thread tasks, one for each chunk
examples-crate/rayon-chunks/main.rs:217
↓ 1 callers
Function
into_domain
(array_dim: u32, [x, y, z]: [u32; 3])
examples-crate/render/main.rs:181
↓ 1 callers
Function
link
(le: f32, r1: f32, r2: f32, p: Vec3A)
examples-crate/render/main.rs:194
↓ 1 callers
Function
make_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 callers
Method
reset
Clears all of the buffers, but keeps the memory allocated for reuse.
src/lib.rs:89
↓ 1 callers
Function
sdf_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 callers
Function
sine_sdf
The higher the frequency (n) the more surface area to mesh.
bench/src/bench.rs:78
↓ 1 callers
Function
sphere
(radius: f32, p: Vec3A)
examples-crate/render/main.rs:185
↓ 1 callers
Function
sphere_sdf
([x, y, z]: [f32; 3])
bench/src/bench.rs:84
↓ 1 callers
Function
write_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
Function
bench_empty_space
(c: &mut Criterion)
bench/src/bench.rs:9
Function
bench_sine_sdf
(c: &mut Criterion)
bench/src/bench.rs:28
Function
bench_sphere
(c: &mut Criterion)
bench/src/bench.rs:51
Method
from
(d: Sd8)
bench/src/bench.rs:107
Method
is_negative
(self)
bench/src/bench.rs:119
Function
main
()
examples-crate/rayon-chunks/main.rs:267
Function
main
()
examples-crate/render/main.rs:16
Function
setup
( mut commands: Commands, mut wireframe_config: ResMut<WireframeConfig>, mut materials: ResMut<Ass
examples-crate/render/main.rs:29