Add 2D trimesh example.

This commit is contained in:
Crozet Sébastien
2021-01-06 18:09:12 +01:00
parent 261ed1ebed
commit cc60809afc
4 changed files with 273 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ pub fn init_world(testbed: &mut Testbed) {
* Create the cubes
*/
let num = 26;
let numy = num * 5;
let rad = 0.5;
let shift = rad * 2.0;
@@ -49,7 +50,7 @@ pub fn init_world(testbed: &mut Testbed) {
let centery = shift / 2.0;
for i in 0..num {
for j in 0usize..num * 5 {
for j in 0usize..numy {
let x = i as f32 * shift - centerx;
let y = j as f32 * shifty + centery + 3.0;