BoundingBox satisfies the INode interface. Computes union of own bounding box with those of all descendents.
()
| 116 | // BoundingBox satisfies the INode interface. |
| 117 | // Computes union of own bounding box with those of all descendents. |
| 118 | func (n *Node) BoundingBox() math32.Box3 { |
| 119 | |
| 120 | bbox := math32.Box3{ |
| 121 | Min: math32.Vector3{X: math.MaxFloat32, Y: math.MaxFloat32, Z: math.MaxFloat32}, |
| 122 | Max: math32.Vector3{X: -math.MaxFloat32, Y: -math.MaxFloat32, Z: -math.MaxFloat32}, |
| 123 | } |
| 124 | for _, inode := range n.Children() { |
| 125 | childBbox := inode.BoundingBox() |
| 126 | bbox.Union(&childBbox) |
| 127 | } |
| 128 | return bbox |
| 129 | } |
| 130 | |
| 131 | // Render satisfies the INode interface. |
| 132 | func (n *Node) Render(gs *gls.GLS) {} |
nothing calls this directly
no test coverage detected