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

Method Filter

ln/filter.go:15–24  ·  view source on GitHub ↗
(v Vector)

Source from the content-addressed store, hash-verified

13var ClipBox = Box{Vector{-1, -1, -1}, Vector{1, 1, 1}}
14
15func (f *ClipFilter) Filter(v Vector) (Vector, bool) {
16 w := f.Matrix.MulPositionW(v)
17 if !f.Scene.Visible(f.Eye, v) {
18 return w, false
19 }
20 if !ClipBox.Contains(w) {
21 return w, false
22 }
23 return w, true
24}

Callers

nothing calls this directly

Calls 3

MulPositionWMethod · 0.80
VisibleMethod · 0.80
ContainsMethod · 0.65

Tested by

no test coverage detected