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

Function BoxForShapes

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

Source from the content-addressed store, hash-verified

7}
8
9func BoxForShapes(shapes []Shape) Box {
10 if len(shapes) == 0 {
11 return Box{}
12 }
13 box := shapes[0].BoundingBox()
14 for _, shape := range shapes {
15 box = box.Extend(shape.BoundingBox())
16 }
17 return box
18}
19
20func BoxForTriangles(shapes []*Triangle) Box {
21 if len(shapes) == 0 {

Callers 1

NewTreeFunction · 0.85

Calls 2

ExtendMethod · 0.80
BoundingBoxMethod · 0.65

Tested by

no test coverage detected