| 138 | } |
| 139 | |
| 140 | void compile_box(ColliderDesc &sd, const Array<Vector3> &points) |
| 141 | { |
| 142 | AABB aabb; |
| 143 | aabb::from_points(aabb, array::size(points), array::begin(points)); |
| 144 | |
| 145 | const Vector3 origin = aabb::center(aabb); |
| 146 | sd.local_tm.t = { origin.x, origin.y, origin.z, 1.0f }; |
| 147 | sd.box.half_size = (aabb.max - aabb.min) * 0.5f; |
| 148 | } |
| 149 | |
| 150 | s32 compile_collider(Buffer &output, UnitCompiler &compiler, FlatJsonObject &obj, CompileOptions &opts) |
| 151 | { |
no test coverage detected