Rodin::Plot::Plot class

Contains the plotting functionalities.

Public types

enum SwapInterval { ADAPTIVE = -1, IMMEDIATE = 0, VSYNC = 1 }

Public functions

template<class ... Args>
auto figure(Args && ... args) -> Artist::Figure&
template<class ... Args>
auto figure(Args && ... args) const -> const Artist::Figure&
auto setSwapInterval(SwapInterval interval) -> bool
auto getSwapInterval() const -> SwapInterval
void show()
auto count() const -> size_t
auto getGLContext() const -> const SDL_GLContext&
void setCursor(GUI::Cursor::SystemCursor c)

Enum documentation

enum Rodin::Plot::Plot::SwapInterval

Represents the possible values of the swap interval for objects of the Artist::Figure class.

Enumerators
ADAPTIVE

Updates synchronized with the vertical retrace, except that if the vertical retrace for the current frame was missed the buffers are swapped immediately.

IMMEDIATE

Immediate updates.

VSYNC

Updates synchronized with the vertical retrace.

Function documentation

template<class ... Args>
Artist::Figure& Rodin::Plot::Plot::figure(Args && ... args)

Parameters
args in Arguments to be passed to the Figure constructor
Returns Reference to the Artist::Figure instance.

Creates a new figure managed by the Plot object.

template<class ... Args>
const Artist::Figure& Rodin::Plot::Plot::figure(Args && ... args) const

Parameters
args in Arguments to be passed to the Figure constructor
Returns Const reference to the Artist::Figure instance.

Creates a new figure managed by the Plot object.

bool Rodin::Plot::Plot::setSwapInterval(SwapInterval interval)

Parameters
interval in Swap interval
Returns true if the operation was successful, false otherwise.

Sets the global swap interval for each figure managed by the Plot object.

SwapInterval Rodin::Plot::Plot::getSwapInterval() const

Returns Swap interval

Queries the current value of the swap interval.

void Rodin::Plot::Plot::show()

Displays all the figures and enters the event handling loop, which blocks execution.

size_t Rodin::Plot::Plot::count() const

Returns The number of figures managed by the the Plot object.

const SDL_GLContext& Rodin::Plot::Plot::getGLContext() const

Returns The underlying OpenGL context.

void Rodin::Plot::Plot::setCursor(GUI::Cursor::SystemCursor c)

Sets the cursor