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

Method RenderWithMatrix

ln/scene.go:47–60  ·  view source on GitHub ↗
(matrix Matrix, eye Vector, width, height, step float64)

Source from the content-addressed store, hash-verified

45}
46
47func (s *Scene) RenderWithMatrix(matrix Matrix, eye Vector, width, height, step float64) Paths {
48 s.Compile()
49 paths := s.Paths()
50 if step > 0 {
51 paths = paths.Chop(step)
52 }
53 paths = paths.Filter(&ClipFilter{matrix, eye, s})
54 if step > 0 {
55 paths = paths.Simplify(1e-6)
56 }
57 matrix = Translate(Vector{1, 1, 0}).Scale(Vector{width / 2, height / 2, 0})
58 paths = paths.Transform(matrix)
59 return paths
60}

Callers 1

RenderMethod · 0.95

Calls 8

CompileMethod · 0.95
PathsMethod · 0.95
TranslateFunction · 0.85
ScaleMethod · 0.80
FilterMethod · 0.65
ChopMethod · 0.45
SimplifyMethod · 0.45
TransformMethod · 0.45

Tested by

no test coverage detected