MCPcopy
hub / github.com/fogleman/ln / NewTree

Function NewTree

ln/tree.go:13–18  ·  view source on GitHub ↗
(shapes []Shape)

Source from the content-addressed store, hash-verified

11}
12
13func NewTree(shapes []Shape) *Tree {
14 box := BoxForShapes(shapes)
15 node := NewNode(shapes)
16 node.Split(0)
17 return &Tree{box, node}
18}
19
20func (tree *Tree) Intersect(r Ray) Hit {
21 tmin, tmax := tree.Box.Intersect(r)

Callers 2

CompileMethod · 0.85
CompileMethod · 0.85

Calls 3

SplitMethod · 0.95
BoxForShapesFunction · 0.85
NewNodeFunction · 0.85

Tested by

no test coverage detected