Private API
Common methods
GridVisualize.AbstractPlotterType
— Typeabstract type AbstractPlotterType
Abstract type for dispatching on plotter
Base.getindex
— Methodgetindex(p, i, j)
Return a SubVisualizer
Base.size
— Methodsize(p)
Return the layout of a GridVisualizer
GridVisualize.ismeshcat
— Methodismeshcat(Plotter)
Heuristically check if Plotter is MeshCat
GridVisualizeTools.extract_visible_bfaces3D
— Methodextract_visible_bfaces3D(
grid,
xyzcut;
gridscale,
primepoints,
Tp,
Tf
)
Extract visible boundary faces - those not cut off by the planes x=xyzcut[1]
or y=xyzcut[2]
or z=xyzcut[3]
.
Return corresponding points and facets for each region for drawing as mesh (Makie,MeshCat) or trisurf (pyplot)
GridVisualizeTools.extract_visible_cells3D
— Methodextract_visible_cells3D(
grid,
xyzcut;
cellcoloring,
gridscale,
primepoints,
Tp,
Tf
)
Extract visible tetrahedra - those intersecting with the planes x=xyzcut[1]
or y=xyzcut[2]
or z=xyzcut[3]
.
Return corresponding points and facets for each region for drawing as mesh (Makie,MeshCat) or trisurf (pyplot)
GridVisualizeTools.marching_tetrahedra
— Methodmarching_tetrahedra(
grid,
func,
planes,
flevels;
gridscale,
kwargs...
)
Extract isosurfaces and plane interpolation for function on 3D tetrahedral mesh. See marching_tetrahedra(coord,cellnodes,func,planes,flevels;tol, primepoints, primevalues, Tv, Tp, Tf)
GridVisualizeTools.marching_triangles
— Methodmarching_triangles(grid, func, levels; gridscale)
Collect isoline snippets on triangles ready for linesegments!
GridVisualize.ispyplot
— Functionispyplot(Plotter)
Heuristically check if Plotter is PyPlot
GridVisualize.isplutovista
— Functionisplutovista(Plotter)
Heuristically check if Plotter is PlutoVista
GridVisualize.isplots
— Functionisplots(Plotter)
Heuristically check if Plotter is Plots
GridVisualize.ismakie
— Functionismakie(Plotter)
Heuristically check if Plotter is Makie/WGLMakie
GridVisualize.isvtkview
— Functionisvtkview(Plotter)
Heuristically check if Plotter is VTKView
PyPlot
GridVisualize.tridata
— Methodtridata(grid, gridscale)
Return tridata to be splatted to PyPlot calls
Makie
GridVisualize.makeaxis3d
— Methodmakeaxis3d(ctx)
Dispatch between LScene and new Axis3. Axis3 does not allow zoom, so we support LScene in addition.
GridVisualize.makescene2d
— Methodmakescene2d(ctx)
Complete scene with title and status line showing interaction state. This uses a gridlayout and its protrusion capabilities.
GridVisualize.makescene3d
— Method makescene3d(ctx)
Complete scene with title and status line showing interaction state. This uses a gridlayout and its protrusion capabilities.
GridVisualize.scene_interaction
— Function scene_interaction(update_scene,view,switchkeys::Vector{Symbol}=[:nothing])
Control multiple scene elements via keyboard up/down keys. Each switchkey is assumed to correspond to one of these elements. Pressing a switch key transfers control to its associated element.
Control of values of the current associated element is performed by triggering change values via up/down (± 1) resp. pageup/pagedown (±10) keys
The update_scene callback gets passed the change value and the symbol.
GridVisualize.FlippableLayout.FLayout
— Typemutable struct FLayout
Struct describing flippable layout data. We don't type annotate with Makie types as they are unknown at start time.
visible
: Visible GridLayout
offscreen
: Hidden GridLayot
blocked
: Has the layout been blocked by the block key ?
layoutables
: Layoutables attached to layout
condition
: Condition variable working together with the blocked field.
GridVisualize.FlippableLayout.flayoutscene
— Methodflayoutscene(;blocked=false, kwargs...)
Layoutscene with interactive layout and blocking functionality.
The ,
key switches between focused view showing only one subscene and "gallery view" showing all layoutables at once.
The space key toggles blocking of the execution of the main therad when yield
is replaced by yieldwait
. Initial blocking state is set by the blocked
kwarg.
The kwargs...
are the same as of AbstractPlotting.layoutscene
.
The idea is that this can work in some cases as a drop-in replacement of layoutscene
.
GridVisualize.FlippableLayout.setmakie!
— Methodsetmakie!(MyMakie)
Set the Makie module. This Makie can be GLMakie,WGLMakie,CairoMakie
GridVisualize.FlippableLayout.yieldwait
— Method yieldwait(fliplayoutscene)
Yield and wait in case of scene being blocked via space key toggle
GridVisualize.FlippableLayout
— ModuleThis module is a submodule of GridVisualize
.
It manages a layoutscene with interactive layout and blocking functionality.
Thanks to Julius Krumbiegel for providing a basic implementation of focus switching.
GridVisualize
avoids creating dependencies on plotting backends. So we provide a way to emulate "import Makie" by allowing to set it as a global variable in the setmakie!
. As a consequence, we can't use Makie types at compile time.
Plots
GridVisualize.rectdata
— Methodrectdata(grid, gridscale, U)
Return rectangular grid data + function to be splatted into Plots calls