MCPcopy Create free account
hub / github.com/cogentcore/core / SetFromBox

Method SetFromBox

math32/sphere.go:32–35  ·  view source on GitHub ↗

SetFromBox sets the center and radius of this sphere to surround given box

(box Box3)

Source from the content-addressed store, hash-verified

30
31// SetFromBox sets the center and radius of this sphere to surround given box
32func (s *Sphere) SetFromBox(box Box3) {
33 s.Center = box.Center()
34 s.Radius = 0.5 * box.Size().Length()
35}
36
37// SetFromPoints sets this sphere from the specified points array and optional center.
38func (s *Sphere) SetFromPoints(points []Vector3, optCenter *Vector3) {

Callers 2

UpdateFromBBoxMethod · 0.80
UpdateFromBBoxMethod · 0.80

Calls 3

SizeMethod · 0.65
CenterMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected