| Reference | Tutorial | Example Code |
| smtk::plotter_2d | interactive phase space plotter |
Inheritance diagram for smtk::plotter_2d:

Public Member Functions | |
| plotter_2d & | add_input (long double *x, const char *label) |
| plotter_2d & | add_input (long double *x, const char **labels, int num=1) |
| plotter_2d & | add_input (double *x, const char *label) |
| plotter_2d & | add_input (double *x, const char **labels, int num=1) |
| plotter_2d & | add_input (float *x, const char *label) |
| plotter_2d & | add_input (float *x, const char **labels, int num=1) |
| bool | is_invalid (void) const |
| see if the object is invalid | |
| bool | is_valid (void) const |
| see if the object is valid | |
| plotter_2d (int *argc=0, char ***argv=0) | |
| plotter_2d & | run (void) |
| plotter_2d & | set_callbacks (int num_plots, double *(*init)(double x, double y, bool &do_draw), double *(*step)(bool &do_draw, bool &show_line)) |
| plotter_2d & | set_line_width (int width) |
| plotter_2d & | set_point_width (int width) |
| plotter_2d & | set_scale (double x_min, double x_max, double y_min, double y_max) |
| plotter_2d & | set_window_title (const char *title) |
| plotter_2d & | stop (void) |
| virtual | ~plotter_2d (void) |
Protected Member Functions | |
| template<class T> | |
| T | invalidate (T t) |
| invalidate the object | |
| void | invalidate (void) |
| invalidate the object | |
| template<class T> | |
| T | validate (T t) |
| validate the object | |
| void | validate (void) |
| validate the object | |
| Reference | Tutorial | Example Code |
| smtk::plotter_2d | interactive phase space plotter |
This class provides a 2D graphical user interface (GUI) display for your code. You can use it to, for example, make an interactive phase space plotter. The GUI will provide a way to control your simulation with minimal coding. The idea of this is to abstract a 2D display that provides additional functionality to a users simple simulation code. This can be use to provide a interactive 2D display for a interactive processes like: - phase space of ODE solver, - interactive map solver, and - bifurcation diagrams.
| plotter_2d::plotter_2d | ( | int * | argc = 0, |
|
| char *** | argv = 0 | |||
| ) |
| argc | is passed to the GUI (graphical user interface) initialization function. | |
| argv | is passed to the GUI initialization function. |
| plotter_2d::~plotter_2d | ( | void | ) | [virtual] |
Close window and clean memory.
| plotter_2d & plotter_2d::add_input | ( | long double * | x, | |
| const char * | label | |||
| ) |
Add an input GUI (graphical user interface) to control the value of a long double.
| x | a pointer to the long double to control the value of. | |
| label | a pointer to label string. |
| plotter_2d & plotter_2d::add_input | ( | long double * | x, | |
| const char ** | labels, | |||
| int | num = 1 | |||
| ) |
Add an many input GUI (graphical user interface) to control the value of many long doubles.
| x | a pointer to the long double to control the value of. | |
| labels | a pointer to an array of label strings. | |
| num | the number of values to widgetize. |
| plotter_2d & plotter_2d::add_input | ( | double * | x, | |
| const char * | label | |||
| ) |
Add an input GUI (graphical user interface) to control the value of a double.
| x | a pointer to the double to control the value of. | |
| label | a pointer to label string. |
| plotter_2d & plotter_2d::add_input | ( | double * | x, | |
| const char ** | labels, | |||
| int | num = 1 | |||
| ) |
Add an many input GUI (graphical user interface) to control the value of many doubles.
| x | a pointer to the double to control the value of. | |
| labels | a pointer to an array of label strings. | |
| num | the number of values to widgetize. |
| plotter_2d & plotter_2d::add_input | ( | float * | x, | |
| const char * | label | |||
| ) |
Add an input GUI (graphical user interface) to control the value of a float.
| x | a pointer to the float to control the value of. | |
| label | a pointer to label string. |
| plotter_2d & plotter_2d::add_input | ( | float * | x, | |
| const char ** | labels, | |||
| int | num = 1 | |||
| ) |
Add an many input GUI (graphical user interface) to control the value of many floats.
| x | a pointer to the float to control the value of. | |
| labels | a pointer to an array of label strings. | |
| num | the number of values to widgetize. |
| T smtk::validation::invalidate | ( | T | t | ) | [inline, protected, inherited] |
invalidate the object
Make the object invalid.
| void smtk::validation::invalidate | ( | void | ) | [inline, protected, inherited] |
invalidate the object
Make the object invalid.
| bool smtk::validation::is_invalid | ( | void | ) | const [inline, inherited] |
see if the object is invalid
| bool smtk::validation::is_valid | ( | void | ) | const [inline, inherited] |
see if the object is valid
| plotter_2d & plotter_2d::run | ( | void | ) |
Run the GUI (graphical user interface). This not return until the GUI is closed.
| plotter_2d & plotter_2d::set_callbacks | ( | int | num_plots, | |
| double *(*)(double x, double y, bool &do_draw) | init, | |||
| double *(*)(bool &do_draw, bool &show_line) | step | |||
| ) |
| num_plots | is the number of x-y points that are in the returned double array. | |
| init | is the callback that will be called each time the plotting starts. | |
| step | is the callback that will be called again and again until it is stopped. The show_line will be passed to the step callback function each time it's called. If the step callback function sets show_line to false than the line will to be drawn between this step point and the last step point. If do_draw is set to false when the step callback is called than the will be no points or lines drawn from that call. |
| plotter_2d & plotter_2d::set_line_width | ( | int | width | ) |
In order to be effective, this must be called after the set_callbacks().
| width | is the width to set all lines in the plotter. If width is less than 0 then there will be no lines drawn. |
| plotter_2d & plotter_2d::set_point_width | ( | int | width | ) |
In order to be effective, this must be called after the set_callbacks().
| width | is the width to set all points in the plotter. If width is less than 0 then there will be no points drawn. |
| plotter_2d & plotter_2d::set_scale | ( | double | x_min, | |
| double | x_max, | |||
| double | y_min, | |||
| double | y_max | |||
| ) |
| x_min | is the minimum x value in the 2D display when the window first opens. | |
| x_max | is the maximum x value in the 2D display when the window first opens. | |
| y_min | is the minimum y value in the 2D display when the window first opens. | |
| y_max | is the maximum y value in the 2D display when the window first opens. |
| plotter_2d & plotter_2d::set_window_title | ( | const char * | title | ) |
| plotter_2d & plotter_2d::stop | ( | void | ) |
Stop the step callback from being called and stop drawing. This does the same thing as hitting the stop button.
| T smtk::validation::validate | ( | T | t | ) | [inline, protected, inherited] |
validate the object
Make the object valid.
| void smtk::validation::validate | ( | void | ) | [inline, protected, inherited] |
validate the object
Make the object valid.
1.5.2