MCPcopy Index your code
hub / github.com/fogleman/ln / MoveTo

Method MoveTo

ln/mesh.go:55–58  ·  view source on GitHub ↗
(position, anchor Vector)

Source from the content-addressed store, hash-verified

53}
54
55func (m *Mesh) MoveTo(position, anchor Vector) {
56 matrix := Translate(position.Sub(m.Box.Anchor(anchor)))
57 m.Transform(matrix)
58}
59
60func (m *Mesh) FitInside(box Box, anchor Vector) {
61 scale := box.Size().Div(m.BoundingBox().Size()).MinComponent()

Callers 1

UnitCubeMethod · 0.95

Calls 4

TransformMethod · 0.95
TranslateFunction · 0.85
SubMethod · 0.80
AnchorMethod · 0.80

Tested by

no test coverage detected