Cleanup projection code #3013
Labels
CairoMakie
This relates to CairoMakie, the vector backend for Makie based on Cairo.
cleanup
enhancement
Feature requests and enhancements
GLMakie
This relates to GLMakie.jl, the OpenGL backend for Makie.
Makie
Backend independent issues (Makie core)
transformation
related to `Transformation` objects
WGLMakie
This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.
We have quite a bit of code that deals with projecting positional data from one space to another. I think there is a fair amount of duplicate code in this, which would be good to remove/unify. The
project
methods also need to be clearer about what they do I think.In terms of clarity it might be good to keep
project(cam, input_space, output_space, pos)
and add morespace
options to exhaust all the options. It might also be nice to allowinput_space => output_space
as an argument here.In https://github.com/MakieOrg/Makie.jl/blob/master/src/camera/projection_math.jl we have
to_world
and variousproject
methods which aren't all that clear. These all ignoremodel
andtransform_func
.In https://github.com/MakieOrg/Makie.jl/blob/master/src/basic_recipes/error_and_rangebars.jl we have
scene_to_screen
andscreen_to_scene
which functionally matchproject
. After #3012 these will be changed toplot_to_screen
andscreen_to_plot
and include model andtransform_func
.GLMakie has some code doing a full plot space -> screen space projection without using
project
at all in https://github.com/MakieOrg/Makie.jl/blob/master/GLMakie/src/drawing_primitives.jl (lines).CairoMakie defines its own project functions in https://github.com/MakieOrg/Makie.jl/blob/master/CairoMakie/src/utils.jl which are used instead of Makie's
project
.The text was updated successfully, but these errors were encountered: