| 361 | } |
| 362 | |
| 363 | OBB RenderWorld::mesh_obb(MeshId mesh) |
| 364 | { |
| 365 | const u32 mesh_i = _mesh_manager.index(mesh); |
| 366 | |
| 367 | const Matrix4x4 &world = _mesh_manager._data.world[mesh_i]; |
| 368 | const OBB &obb = _mesh_manager._data.obb[mesh_i]; |
| 369 | |
| 370 | OBB o; |
| 371 | o.tm = obb.tm * world; |
| 372 | o.half_extents = obb.half_extents; |
| 373 | |
| 374 | return o; |
| 375 | } |
| 376 | |
| 377 | f32 RenderWorld::mesh_cast_ray(MeshId mesh, const Vector3 &from, const Vector3 &dir) |
| 378 | { |