Library Design

wxGLPlot widget is the user interface component that is visible to users of your programs. It displays a scene consisting of one or more wxGLPlotItems and optionally displays an interactive legend. It may also display some wxGLPlotOverlays that assist the user in interpreting the displayed data.

The plot widget provides some support for settings that are global to the scene, such as a color palette.

Plot Items

The plot widget acts as a container for a collection of data you want to show in the plot. Plot items all know how to render themselves using OpenGL and how to represent themselves as legend items.

Plot objects represent the data to display. Things likely to be supported include sparse point data (2D or 3D), gridded point data (1D or 2D free variables + 1D value), gridded vector fields (2D or 3D free variables + 2D or 3D value), image data (2D free variables + 3D color) and polygonal meshes (3D).

Sparse point data will have different display modes like isolated points or connected lines.

Gridded point data will have display modes like connected lines, meshed surface, bar graph or contour lines.

Plot Overlays

In addition to the data representation, the plot widget will render visual cues to help the user interpret the data. Just like plot items, these overlays know how to render themselves using OpenGL, but they may use a screen coordinate system rather than a data coordinate system.

Scale bars and axes fall into this category of objects.

Legend View

The legend view is implemented using a list control next to the plot image. It shows toggles, small icons and text labels for plot items. The optional toggles allow the user to hide certain plot items to reduce clutter. The legend can be hidden from the user, but the toggle functionality remains accessible programmatically.

OpenGL Support

The drawing code should use functionality available in an OpenGL ES 2.x profile. Internal library support will provide suitable shaders and offer utility functions to render various geometrical primitives as well as text.