Forge
Plot Class Reference

Plot is a line graph to display two dimensional data. More...

#include <plot.h>

Public Member Functions

FGAPI Plot (const unsigned pNumPoints, const dtype pDataType, const ChartType pChartType, const PlotType pPlotType=FG_PLOT_LINE, const MarkerType pMarkerType=FG_MARKER_NONE)
 Creates a Plot object. More...
 
FGAPI Plot (const Plot &pOther)
 Copy constructor for Plot. More...
 
FGAPI ~Plot ()
 Plot Destructor. More...
 
FGAPI void setColor (const forge::Color pColor)
 Set the color of line graph(plot) More...
 
FGAPI void setColor (const float pRed, const float pGreen, const float pBlue, const float pAlpha)
 Set the color of line graph(plot) More...
 
FGAPI void setLegend (const char *pLegend)
 Set plot legend. More...
 
FGAPI void setMarkerSize (const float pMarkerSize)
 Set global marker size. More...
 
FGAPI unsigned vertices () const
 Get the buffer identifier for vertices. More...
 
FGAPI unsigned colors () const
 Get the buffer identifier for color values per vertex. More...
 
FGAPI unsigned alphas () const
 Get the buffer identifier for alpha values per vertex. More...
 
FGAPI unsigned radii () const
 Get the buffer identifier for per vertex marker sizes. More...
 
FGAPI unsigned verticesSize () const
 Get the vertex buffer size in bytes. More...
 
FGAPI unsigned colorsSize () const
 Get the colors buffer size in bytes. More...
 
FGAPI unsigned alphasSize () const
 Get the alpha values buffer size in bytes. More...
 
FGAPI unsigned radiiSize () const
 Get the marker sizes buffer size in bytes. More...
 
FGAPI fg_plot get () const
 Get the handle to internal implementation of plot. More...
 

Detailed Description

Constructor & Destructor Documentation

§ Plot() [1/2]

FGAPI Plot ( const unsigned  pNumPoints,
const dtype  pDataType,
const ChartType  pChartType,
const PlotType  pPlotType = FG_PLOT_LINE,
const MarkerType  pMarkerType = FG_MARKER_NONE 
)

Creates a Plot object.

Parameters
[in]pNumPointsis number of data points to display
[in]pDataTypetakes one of the values of dtype that indicates the integral data type of plot data
[in]pChartTypedictates the dimensionality of the chart
[in]pPlotTypedictates the type of plot/graph, it can take one of the values of PlotType
[in]pMarkerTypeindicates which symbol is rendered as marker. It can take one of the values of MarkerType.

§ Plot() [2/2]

FGAPI Plot ( const Plot pOther)

Copy constructor for Plot.

Parameters
[in]pOtheris the Plot of which we make a copy of.

§ ~Plot()

FGAPI ~Plot ( )

Plot Destructor.

Member Function Documentation

§ alphas()

FGAPI unsigned alphas ( ) const

Get the buffer identifier for alpha values per vertex.

Returns
alpha values buffer resource id.
Examples:
cpu/bubblechart.cpp, and opencl/bubblechart.cpp.

§ alphasSize()

FGAPI unsigned alphasSize ( ) const

Get the alpha values buffer size in bytes.

Returns
alpha buffer size in bytes
Examples:
cpu/bubblechart.cpp, and opencl/bubblechart.cpp.

§ colors()

FGAPI unsigned colors ( ) const

Get the buffer identifier for color values per vertex.

Returns
colors buffer resource id.
Examples:
cpu/bubblechart.cpp, and opencl/bubblechart.cpp.

§ colorsSize()

FGAPI unsigned colorsSize ( ) const

Get the colors buffer size in bytes.

Returns
colors buffer size in bytes
Examples:
cpu/bubblechart.cpp, and opencl/bubblechart.cpp.

§ get()

FGAPI fg_plot get ( ) const

Get the handle to internal implementation of plot.

§ radii()

FGAPI unsigned radii ( ) const

Get the buffer identifier for per vertex marker sizes.

Returns
marker sizes buffer resource id.
Examples:
cpu/bubblechart.cpp, and opencl/bubblechart.cpp.

§ radiiSize()

FGAPI unsigned radiiSize ( ) const

Get the marker sizes buffer size in bytes.

Returns
marker sizes buffer size in bytes
Examples:
cpu/bubblechart.cpp, and opencl/bubblechart.cpp.

§ setColor() [1/2]

FGAPI void setColor ( const forge::Color  pColor)

Set the color of line graph(plot)

Parameters
[in]pColortakes values of forge::Color to define plot color
Examples:
cpu/bubblechart.cpp, cpu/field.cpp, cpu/plotting.cpp, opencl/bubblechart.cpp, opencl/field.cpp, and opencl/plotting.cpp.

§ setColor() [2/2]

FGAPI void setColor ( const float  pRed,
const float  pGreen,
const float  pBlue,
const float  pAlpha 
)

Set the color of line graph(plot)

Parameters
[in]pRedis Red component in range [0, 1]
[in]pGreenis Green component in range [0, 1]
[in]pBlueis Blue component in range [0, 1]
[in]pAlphais Blue component in range [0, 1]

§ setLegend()

FGAPI void setLegend ( const char *  pLegend)

§ setMarkerSize()

FGAPI void setMarkerSize ( const float  pMarkerSize)

Set global marker size.

This size will be used for rendering markers if no per vertex marker sizes are provided. This value defaults to 10

Parameters
[in]pMarkerSizeis the target marker size for scatter plots or line plots with markers
Examples:
cpu/bubblechart.cpp, cpu/field.cpp, opencl/bubblechart.cpp, and opencl/field.cpp.

§ vertices()

FGAPI unsigned vertices ( ) const

Get the buffer identifier for vertices.

Returns
vertex buffer resource id.
Examples:
cpu/bubblechart.cpp, cpu/field.cpp, cpu/plot3.cpp, cpu/plotting.cpp, opencl/bubblechart.cpp, opencl/field.cpp, opencl/plot3.cpp, and opencl/plotting.cpp.

§ verticesSize()

FGAPI unsigned verticesSize ( ) const

Get the vertex buffer size in bytes.

Returns
vertex buffer size in bytes
Examples:
cpu/bubblechart.cpp, cpu/field.cpp, cpu/plot3.cpp, cpu/plotting.cpp, opencl/bubblechart.cpp, opencl/field.cpp, opencl/plot3.cpp, and opencl/plotting.cpp.

The documentation for this class was generated from the following file: