sphore 0.0.1
SPH openGL rendering engine

src/plot.h File Reference

Code for managing plots. More...

#include "sphore.h"
#include "data.h"
#include "viewport.h"

Go to the source code of this file.

Typedefs

typedef struct _plot plot_t
 Public access to the internal storage of plot settings.

Functions

plot_tplot_create ()
 Creates a new plot.
void plot_destroy (plot_t *plot)
 Frees the memory ascociated with a given plot.
SRErenderMode plot_get_render_mode (plot_t *plot)
 Get the mode of rendering used by the plot.
void plot_set_data (plot_t *plot, data_t *data)
 Sets the data that a plot will render.
data_tplot_get_data (plot_t *plot)
 Get the data that a plot is rendering.
const float * plot_get_clear_colour (plot_t *plot)
 Get the colour to be used where there is no data rendered.
viewport_tplot_get_viewport (plot_t *plot)
 Get the viewport of the given plot.

Detailed Description

Code for managing plots.


Typedef Documentation

typedef struct _plot plot_t

Public access to the internal storage of plot settings.

Memory managment performed with plot_create and plot_destroy.


Function Documentation

plot_t* plot_create ( )

Creates a new plot.

Returns:
A pointer to the new plot.
void plot_destroy ( plot_t plot)

Frees the memory ascociated with a given plot.

Parameters:
[in]plotThe plot to clean up.
const float* plot_get_clear_colour ( plot_t plot)

Get the colour to be used where there is no data rendered.

Parameters:
[in]plotThe plot to query.
Returns:
An array storing the clear colour. The array will have four values - red, green, blue and alpha. NULL will be returned if the given plot is invalid.
data_t* plot_get_data ( plot_t plot)

Get the data that a plot is rendering.

Parameters:
[in]plotThe plot to query.
Returns:
A pointer to the data the given plot is rendering.
SRErenderMode plot_get_render_mode ( plot_t plot)

Get the mode of rendering used by the plot.

Parameters:
[in]plotThe plot to query.
Returns:
The rendering mode used by the given plot.
viewport_t* plot_get_viewport ( plot_t plot)

Get the viewport of the given plot.

Parameters:
[in]plotThe plot to query.
Returns:
A pointer to the viewport of the given plot.
void plot_set_data ( plot_t plot,
data_t data 
)

Sets the data that a plot will render.

Parameters:
[in]plotThe plot you wish to set the data for.
[in]dataThe data the plot should render.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines