1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
use crate::*;
// // TODO: move this into quad
// pub fn draw_collider_p(
// box_texture: TextureHandle,
// collider: &Collider,
// color: Color,
// ) {
// let aabb: &Cuboid = collider.shape().as_cuboid().unwrap();
//
// let w = aabb.half_extents.x * 2.0;
// let h = aabb.half_extents.y * 2.0;
//
// draw_texture_z_ex(
// box_texture,
// vec2(
// collider.absolute_translation().x - 0.5 * w,
// -collider.absolute_translation().y - 0.5 * h,
// ),
// color,
// 50, // TODO
// DrawTextureParams {
// dest_size: Some(Size::world(w, h)),
// rotation: -collider.absolute_rotation(),
// ..Default::default()
// },
// );
// }
// pub fn draw_aabb(aabb: Aabb, _thickness: f32, color: Color) {
// let scale = 1.0;
//
// draw_rectangle(
// Position::world(aabb.mins.x * scale, -aabb.mins.y * scale),
// aabb.extents().x * scale,
// aabb.extents().y * scale,
// color,
// );
// }