22# Licensed under the MIT License. See LICENSE in the project root.
33# ------------------------------------------------------------------
44
5- isoptimized (:: Type , :: TB.Identity ) = true
6- isoptimized (CRS:: Type , t:: TB.SequentialTransform ) = all (tᵢ -> isoptimized (CRS, tᵢ), t)
7-
8- isoptimized (:: Type , :: GeometricTransform ) = false
9-
10- isoptimized (:: Type{<:Cartesian2D} , :: Proj{<:Projected} ) = true
11- isoptimized (:: Type{<:Projected} , :: Proj{<:Cartesian2D} ) = true
12-
13- isoptimized (:: Type , :: Rotate{<:Angle2d} ) = true
14- isoptimized (:: Type , :: Translate ) = true
15- isoptimized (:: Type , :: Scale ) = true
16- function isoptimized (:: Type , t:: Affine{2} )
17- A, _ = TB. parameters (t)
18- isdiag (A) || isrotation (A)
19- end
20-
21- vizgrid! (plot:: Viz{<:Tuple{Meshes.TransformedGrid}} , M:: Type{<:𝔼} , pdim:: Val{2} , edim:: Val{2} ) =
22- viztransfgrid! (plot, M, pdim, edim)
23-
24- vizgrid! (plot:: Viz{<:Tuple{Meshes.TransformedGrid}} , M:: Type{<:𝔼} , pdim:: Val{3} , edim:: Val{3} ) =
25- viztransfgrid! (plot, M, pdim, edim)
26-
27- function viztransfgrid! (plot, M, pdim, edim)
5+ function vizgrid! (plot:: Viz{<:Tuple{Meshes.TransformedGrid}} , M:: Type{<:𝔼} , pdim:: Val , edim:: Val )
286 tgrid = plot[:object ]
297 grid = Makie. @lift parent ($ tgrid)
308 trans = Makie. @lift Meshes. transform ($ tgrid)
@@ -42,6 +20,22 @@ function viztransfgrid!(plot, M, pdim, edim)
4220 end
4321end
4422
23+ isoptimized (:: Type , :: TB.Identity ) = true
24+ isoptimized (CRS:: Type , t:: TB.SequentialTransform ) = all (tᵢ -> isoptimized (CRS, tᵢ), t)
25+
26+ isoptimized (:: Type , :: GeometricTransform ) = false
27+
28+ isoptimized (:: Type{<:Cartesian2D} , :: Proj{<:Projected} ) = true
29+ isoptimized (:: Type{<:Projected} , :: Proj{<:Cartesian2D} ) = true
30+
31+ isoptimized (:: Type , :: Rotate{<:Angle2d} ) = true
32+ isoptimized (:: Type , :: Translate ) = true
33+ isoptimized (:: Type , :: Scale ) = true
34+ function isoptimized (:: Type , t:: Affine{2} )
35+ A, _ = TB. parameters (t)
36+ isdiag (A) || isrotation (A)
37+ end
38+
4539makietransform! (plot, trans:: Makie.Observable{<:TB.Identity} ) = nothing
4640
4741makietransform! (plot, trans:: Makie.Observable{<:Proj} ) = nothing
0 commit comments