Fix formatting issues I missed before.

This commit is contained in:
Joshua Yanovski 2020-08-02 20:43:52 +02:00
parent a428a3ebba
commit 5f3b7294af
3 changed files with 73 additions and 87 deletions

View File

@ -151,15 +151,7 @@ impl<'a> GreedyMesh<'a> {
/// Returns an estimate of the bounds of the current meshed model. /// Returns an estimate of the bounds of the current meshed model.
/// ///
/// For more information on the config parameter, see [GreedyConfig]. /// For more information on the config parameter, see [GreedyConfig].
pub fn push< pub fn push<M: PartialEq, D: 'a, FL, FC, FO, FS, FP>(
M: PartialEq,
D: 'a,
FL,
FC,
FO,
FS,
FP,
>(
&mut self, &mut self,
config: GreedyConfig<D, FL, FC, FO, FS, FP>, config: GreedyConfig<D, FL, FC, FO, FS, FP>,
) -> Aabb<u16> ) -> Aabb<u16>

View File

@ -82,8 +82,7 @@ where
}; };
let mut opaque_mesh = Mesh::new(); let mut opaque_mesh = Mesh::new();
let bounds = greedy.push( let bounds = greedy.push(GreedyConfig {
GreedyConfig {
data: self, data: self,
draw_delta, draw_delta,
greedy_size, greedy_size,
@ -103,8 +102,7 @@ where
|atlas_pos, pos, norm, &_meta| create_opaque(atlas_pos, pos, norm), |atlas_pos, pos, norm, &_meta| create_opaque(atlas_pos, pos, norm),
)); ));
}, },
}, });
);
let bounds = bounds.map(f32::from); let bounds = bounds.map(f32::from);
let bounds = Aabb { let bounds = Aabb {
min: (bounds.min + offs) * scale, min: (bounds.min + offs) * scale,
@ -195,8 +193,7 @@ where
}; };
let mut opaque_mesh = Mesh::new(); let mut opaque_mesh = Mesh::new();
let _bounds = greedy.push( let _bounds = greedy.push(GreedyConfig {
GreedyConfig {
data: self, data: self,
draw_delta, draw_delta,
greedy_size, greedy_size,
@ -216,8 +213,7 @@ where
|atlas_pos, pos, norm, &meta| create_opaque(atlas_pos, pos, norm, meta), |atlas_pos, pos, norm, &meta| create_opaque(atlas_pos, pos, norm, meta),
)); ));
}, },
}, });
);
(opaque_mesh, Mesh::new(), Mesh::new(), ()) (opaque_mesh, Mesh::new(), Mesh::new(), ())
} }

View File

@ -519,8 +519,7 @@ impl<'a, V: RectRasterableVol<Vox = Block> + ReadVol + Debug>
let mut greedy = GreedyMesh::new(max_size); let mut greedy = GreedyMesh::new(max_size);
let mut opaque_mesh = Mesh::new(); let mut opaque_mesh = Mesh::new();
let mut fluid_mesh = Mesh::new(); let mut fluid_mesh = Mesh::new();
let bounds = greedy.push( let bounds = greedy.push(GreedyConfig {
GreedyConfig {
data: (), data: (),
draw_delta, draw_delta,
greedy_size, greedy_size,
@ -553,8 +552,7 @@ impl<'a, V: RectRasterableVol<Vox = Block> + ReadVol + Debug>
)); ));
}, },
}, },
}, });
);
let bounds = bounds.map(f32::from); let bounds = bounds.map(f32::from);
let bounds = Aabb { let bounds = Aabb {