(r Ray)
| 80 | } |
| 81 | |
| 82 | func (node *Node) IntersectShapes(r Ray) Hit { |
| 83 | hit := NoHit |
| 84 | for _, shape := range node.Shapes { |
| 85 | h := shape.Intersect(r) |
| 86 | if h.T < hit.T { |
| 87 | hit = h |
| 88 | } |
| 89 | } |
| 90 | return hit |
| 91 | } |
| 92 | |
| 93 | func (node *Node) PartitionScore(axis Axis, point float64) int { |
| 94 | left, right := 0, 0 |