Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TanTanDev/binary_greedy_mesher_demo
/ functions
Functions
101 in github.com/TanTanDev/binary_greedy_mesher_demo
⨍
Functions
101
◇
Types & classes
29
↓ 27 callers
Method
is_solid
(&self)
src/voxel.rs:13
↓ 13 callers
Method
get_block
! helper function to get block data that may exceed the bounds of the middle chunk ! input position is local pos to middle chunk
src/chunks_refs.rs:78
↓ 11 callers
Method
get_block
(&self, index: usize)
src/chunk.rs:16
↓ 11 callers
Function
make_vertex_u32
( // position: [i32; 3], /*, normal: i32, color: Color, texture_id: u32*/ pos: IVec3, /*, normal: i32,
src/utils.rs:70
↓ 11 callers
Method
world_to_sample
! offset input position with this face direction
src/face_direction.rs:41
↓ 8 callers
Method
jump_index
! how much to multiply to reach next voxel ! lower lod gives higher jump
src/lod.rs:25
↓ 8 callers
Method
normal_index
! normal data is packed in the shader
src/face_direction.rs:17
↓ 7 callers
Function
vec3_to_index
(pos: IVec3, bounds: i32)
src/utils.rs:125
↓ 6 callers
Function
generate_indices
(vertex_count: usize)
src/utils.rs:95
↓ 6 callers
Function
push_face
(mesh: &mut ChunkMesh, dir: Direction, vpos: IVec3, color: Color, block_type: u32)
src/culled_mesher.rs:11
↓ 6 callers
Function
push_face_ao
( chunks_refs: &ChunksRefs, mesh: &mut ChunkMesh, dir: Direction, vpos: IVec3, color: Colo
src/culled_mesher.rs:227
↓ 6 callers
Function
vertices_from_face_no_ao
( face_dir: FaceDir, chunks_refs: &ChunksRefs, lod: &Lod, )
src/greedy_mesher.rs:123
↓ 5 callers
Method
size
! the amount of voxels per axis
src/lod.rs:13
↓ 4 callers
Function
add_voxel_to_axis_cols
( b: &crate::voxel::BlockData, x: usize, y: usize, z: usize, axis_cols
src/greedy_mesher_optimized.rs:31
↓ 4 callers
Method
get_normal
! normal data is packed in the shader
src/quad.rs:16
↓ 4 callers
Function
index_to_ivec3
(i: i32)
src/utils.rs:4
↓ 4 callers
Function
index_to_ivec3_bounds
(i: i32, bounds: i32)
src/utils.rs:12
↓ 3 callers
Method
air_sample_dir
! direction to sample face culling
src/face_direction.rs:29
↓ 3 callers
Function
build_chunk_mesh
(chunks_refs: ChunksRefs, lod: Lod)
src/greedy_mesher.rs:16
↓ 3 callers
Function
greedy_mesh_binary_plane
! generate quads of a binary slice ! lod not implemented yet
src/greedy_mesher.rs:251
↓ 3 callers
Function
vertices_from_face
! generate vertices for the facing direction, all planes of a chunk
src/greedy_mesher.rs:57
↓ 2 callers
Method
append_vertices
! compress this quad data into the input vertices vec
src/greedy_mesher.rs:169
↓ 2 callers
Function
build_chunk_mesh_ao
(chunks_refs: &ChunksRefs, _lod: Lod)
src/culled_mesher.rs:147
↓ 2 callers
Method
get_2
(&self, pos: IVec3, offset: IVec3)
src/chunks_refs.rs:125
↓ 2 callers
Method
get_adjacent_blocks
! helper function to sample adjacent(back,left,down) voxels
src/chunks_refs.rs:101
↓ 2 callers
Method
get_block_if_filled
(&self)
src/chunk.rs:26
↓ 2 callers
Method
is_air
(&self)
src/voxel.rs:20
↓ 2 callers
Function
make_chunks_refs
helper for incrementing and constructing chunksrefs
benches/meshing.rs:33
↓ 2 callers
Function
make_offset_vec
! constructs spherical positions with the provided chunk radius
src/scanner.rs:182
↓ 2 callers
Method
reverse_order
! returns true if vertices should be reverse. ! (needed because indices are always same)
src/face_direction.rs:54
↓ 1 callers
Function
ambient_corner_voxels
! helper for fetching voxels that will contribute to the current voxels ao value
src/culled_mesher.rs:98
↓ 1 callers
Method
append_vertices
! compress this quad data into the input vertices vec
src/greedy_mesher_optimized.rs:223
↓ 1 callers
Function
bench_chunk
(world_pos: IVec3)
benches/chunk.rs:5
↓ 1 callers
Function
binary_mesh_optimized
(chunks_refs: ChunksRefs)
benches/meshing.rs:24
↓ 1 callers
Function
build_chunk_mesh_no_ao
(chunks_refs: ChunksRefs, _lod: Lod)
src/culled_mesher.rs:23
↓ 1 callers
Function
culled_mesh_ao
(chunks_refs: ChunksRefs)
benches/meshing.rs:28
↓ 1 callers
Method
get_block_no_neighbour
! helper function to get voxels ! panics if the local pos is outside the middle chunk
src/chunks_refs.rs:94
↓ 1 callers
Function
get_edging_chunk
(pos: IVec3)
src/utils.rs:43
↓ 1 callers
Method
get_opposite
(self)
src/quad.rs:27
↓ 1 callers
Method
get_von_neumann
! helper function to sample adjacent voxels, von neuman include all facing planes
src/chunks_refs.rs:114
↓ 1 callers
Function
greedy_mesh_binary_plane
! generate quads of a binary slice ! lod not implemented atm
src/greedy_mesher_optimized.rs:307
↓ 1 callers
Method
is_all_voxels_same
returns if all the voxels are the same this is an incredibly fast approximation (1 sample per chunk) all = voxels[0] so may be inacurate, but the odds
src/chunks_refs.rs:42
↓ 1 callers
Function
iter_chunkrefs
(chunks_refs: ChunksRefs)
benches/chunks_refs.rs:21
↓ 1 callers
Function
iter_chunkrefs_padding
(chunks_refs: ChunksRefs)
benches/chunks_refs.rs:10
↓ 1 callers
Function
iter_vec
(data: Vec<BlockData>)
benches/chunks_refs.rs:32
↓ 1 callers
Method
negate_axis
! get delta for traversing the previous axis pos
src/face_direction.rs:66
↓ 1 callers
Function
push_face
construct vertices for a face in provided direciton
src/culled_mesher_optimized.rs:21
↓ 1 callers
Method
unload_all_meshes
(&mut self, scanner: &Scanner, scanner_transform: &GlobalTransform)
src/voxel_engine.rs:171
↓ 1 callers
Function
world_to_chunk
(pos: Vec3)
src/utils.rs:88
Method
alpha_mode
(&self)
src/rendering.rs:96
Function
ambient_corner_voxels_cloned
( chunks_refs: &ChunksRefs, direction: Direction, local_pos: IVec3, )
src/culled_mesher.rs:122
Function
apply_chunk_material
( no_wireframe: Query<Entity, With<Handle<ChunkMaterial>>>, wireframe: Query<Entity, With<Handle<Chunk
src/rendering.rs:30
Function
bench_mesh
(chunks_refs: ChunksRefs)
benches/meshing.rs:16
Function
bench_mesh_no_ao
(chunks_refs: ChunksRefs)
benches/meshing.rs:20
Method
build
(&self, app: &mut App)
src/sun.rs:30
Method
build
(&self, app: &mut App)
src/scanner.rs:17
Method
build
(&self, app: &mut App)
src/rendering.rs:22
Method
build
(&self, app: &mut App)
src/voxel_engine.rs:35
Function
build_chunk_mesh
(chunks_refs: &ChunksRefs, lod: Lod)
src/greedy_mesher_optimized.rs:17
Function
build_chunk_mesh
(chunks_refs: ChunksRefs, lod: Lod)
src/culled_mesher_optimized.rs:54
Function
build_chunk_mesh_no_ao
(chunks_refs: ChunksRefs, lod: Lod)
src/greedy_mesher.rs:34
Function
criterion_benchmark
(c: &mut Criterion)
benches/chunks_refs.rs:44
Function
criterion_benchmark
(c: &mut Criterion)
benches/chunk.rs:9
Function
criterion_benchmark
(c: &mut Criterion)
benches/meshing.rs:66
Function
daylight_cycle
( mut query: Query<(&mut Transform, &mut DirectionalLight), With<Sun>>, mut timer: ResMut<SkyTime>,
src/sun.rs:45
Function
debug_inputs
( keyboard_input: Res<ButtonInput<KeyCode>>, mut voxel_engine: ResMut<VoxelEngine>, scanners: Quer
src/voxel_engine.rs:60
Method
default
()
src/voxel_engine.rs:187
Function
detect_move
! on scanner chunk change, enqueue chunks to load/unload
src/scanner.rs:83
Function
diagnostics_count
(mut diagnostics: Diagnostics, voxel_engine: Res<VoxelEngine>)
src/voxel_engine.rs:146
Method
fragment_shader
()
src/rendering.rs:92
Method
from_direction
(direction: Direction, pos: IVec3, color: Color)
src/quad.rs:50
Method
generate
! shape our voxel data based on the chunk_pos
src/chunk.rs:35
Function
index_functions
()
src/utils.rs:111
Function
index_to_ivec3_bounds_reverse
(i: i32, bounds: i32)
src/utils.rs:20
Function
is_on_edge
(pos: IVec3)
src/utils.rs:28
Function
join_data
! join the chunkdata threads
src/voxel_engine.rs:359
Function
join_mesh
! join the multithreaded chunk mesh tasks, and construct a finalized chunk entity
src/voxel_engine.rs:411
Function
main
()
src/main.rs:34
Method
make_dummy_chunk_refs
! only use for testing purposes
src/chunks_refs.rs:61
Function
make_empty
()
benches/meshing.rs:38
Function
make_filled
()
benches/meshing.rs:50
Function
modify_current_terrain
( query: Query<&Transform, With<Camera>>, key: Res<ButtonInput<KeyCode>>, mut voxel_engine: ResMut
src/main.rs:78
Method
new
! construct scanner, chunk offsets are based on distance ! warning: slow execution time on distances above 15-20,
src/scanner.rs:62
Method
prepass_fragment_shader
()
src/rendering.rs:115
Method
prepass_vertex_shader
()
src/rendering.rs:111
Function
promote_dirty_meshes
( mut commands: Commands, children: Query<(Entity, &Handle<Mesh>, &Parent), With<WaitingToLoadMeshTag>
src/voxel_engine.rs:384
Function
scan_data
( mut scanners: Query<(&mut Scanner, &GlobalTransform)>, mut voxel_engine: ResMut<VoxelEngine>, )
src/scanner.rs:198
Function
scan_data_unload
( mut scanners: Query<(&mut Scanner, &GlobalTransform)>, mut voxel_engine: ResMut<VoxelEngine>, )
src/scanner.rs:231
Function
scan_mesh
(mut scanners: Query<&mut Scanner>, mut voxel_engine: ResMut<VoxelEngine>)
src/scanner.rs:256
Function
scan_mesh_unload
(mut scanners: Query<&mut Scanner>, mut voxel_engine: ResMut<VoxelEngine>)
src/scanner.rs:247
Function
setup
( mut commands: Commands, mut chunk_materials: ResMut<Assets<ChunkMaterial>>, mut chunk_materials_
src/main.rs:102
Function
setup_diagnostics
(mut onscreen: ResMut<ScreenDiagnostics>)
src/voxel_engine.rs:115
Function
slicer
(data: [u32; 32])
benches/meshing.rs:62
Method
specialize
( _pipeline: &MaterialPipeline<Self>, descriptor: &mut RenderPipelineDescriptor, layou
src/rendering.rs:100
Function
start_data_tasks
! begin data building tasks for chunks in range
src/voxel_engine.rs:208
Function
start_mesh_tasks
! begin mesh building tasks for chunks in range
src/voxel_engine.rs:277
Function
start_modifications
start
src/voxel_engine.rs:321
Method
try_new
! construct a ChunkRefs at middle_chunk position ! safety: panics if ChunkData doesn't exist in input world_data
src/chunks_refs.rs:26
Function
unload_data
! destroy enqueued, chunk data
src/voxel_engine.rs:243
Function
unload_mesh
! destroy enqueued, chunk mesh entities
src/voxel_engine.rs:255
next →
1–100 of 101, ranked by callers