| 127 | } |
| 128 | |
| 129 | void compile_capsule(ColliderDesc &sd, const Array<Vector3> &points) |
| 130 | { |
| 131 | AABB aabb; |
| 132 | aabb::from_points(aabb, array::size(points), array::begin(points)); |
| 133 | |
| 134 | const Vector3 origin = aabb::center(aabb); |
| 135 | sd.local_tm.t = { origin.x, origin.y, origin.z, 1.0f }; |
| 136 | sd.capsule.radius = aabb::radius(aabb) / 2.0f; |
| 137 | sd.capsule.height = (aabb.max.y - aabb.min.y) / 2.0f; |
| 138 | } |
| 139 | |
| 140 | void compile_box(ColliderDesc &sd, const Array<Vector3> &points) |
| 141 | { |
no test coverage detected