SetFromCenterAndSize set this bounding box from a center point and size. Size is a vector from the minimum point to the maximum point. Returns pointer to this updated bounding box.
(center, size *Vector3)
| 52 | // Size is a vector from the minimum point to the maximum point. |
| 53 | // Returns pointer to this updated bounding box. |
| 54 | func (b *Box3) SetFromCenterAndSize(center, size *Vector3) *Box3 { |
| 55 | |
| 56 | v1 := NewVector3(0, 0, 0) |
| 57 | halfSize := v1.Copy(size).MultiplyScalar(0.5) |
| 58 | b.Min.Copy(center).Sub(halfSize) |
| 59 | b.Max.Copy(center).Add(halfSize) |
| 60 | return b |
| 61 | } |
| 62 | |
| 63 | // Copy copy other to this bounding box. |
| 64 | // Returns pointer to this updated bounding box. |
nothing calls this directly
no test coverage detected