sphore 0.0.1
SPH openGL rendering engine

src/plot.c File Reference

Code for managing plots. More...

#include "sphore.h"
#include "viewport.h"
#include "plot.h"
#include "data.h"
#include "camera.h"
#include <stdlib.h>

Data Structures

struct  _plot
 Internal storage for plot settings. More...

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.


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