()
| 229 | } |
| 230 | |
| 231 | func (b *Body) BoundingBox() math32.Box3 { |
| 232 | |
| 233 | // TODO future allow multiple shapes |
| 234 | mat4 := math32.NewMatrix4().Compose(b.position, b.quaternion, math32.NewVector3(1, 1, 1)) |
| 235 | localBB := b.shape.BoundingBox() |
| 236 | worldBB := localBB.ApplyMatrix4(mat4) |
| 237 | return *worldBB |
| 238 | } |
| 239 | |
| 240 | func (b *Body) SetMass(mass float32) { |
| 241 |
nothing calls this directly
no test coverage detected