Surface Class Reference

Surface is a graph to display three dimensional data. More...

`#include <surface.h>`

## Public Member Functions

FGAPI | Surface (const unsigned pNumXPoints, const unsigned pNumYPoints, const dtype pDataType, const PlotType pPlotType=FG_PLOT_SURFACE, const MarkerType pMarkerType=FG_MARKER_NONE)
| Creates a Surface object.
FGAPI | Surface (const Surface &pOther)
| Copy constructor for surface.
FGAPI | Surface (const fg_surface pHandle)
| Construct Surface ojbect from fg_surface resource handle.
FGAPI | ~Surface ()
| surface Destructor
FGAPI void | setColor (const forge::Color pColor)
| Set the color of line graph(surface).
FGAPI void | setColor (const float pRed, const float pGreen, const float pBlue, const float pAlpha)
| Set the color of line graph(surface).
FGAPI void | setLegend (const char *pLegend)
| Set surface legend.
FGAPI unsigned | vertices () const
| Get the buffer identifier for vertices.
FGAPI unsigned | colors () const
| Get the buffer identifier for color values per vertex.
FGAPI unsigned | alphas () const
| Get the buffer identifier for alpha values per vertex.
FGAPI unsigned | verticesSize () const
| Get the vertex buffer size in bytes.
FGAPI unsigned | colorsSize () const
| Get the colors buffer size in bytes.
FGAPI unsigned | alphasSize () const
| Get the alpha values buffer size in bytes.
FGAPI fg_surface | get () const
| Get the handle to internal implementation of surface.

## Detailed Description

Surface is a graph to display three dimensional data.

Examples
  cpu/surface.cpp, and opencl/surface.cpp.

## Constructor & Destructor Documentation

## Surface() [1/3]

FGAPI Surface | ( | const unsigned | pNumXPoints,
|  | const unsigned | pNumYPoints,
|  | const dtype | pDataType,
|  | const PlotType | pPlotType = FG_PLOT_SURFACE,
|  | const MarkerType | pMarkerType = FG_MARKER_NONE )

Creates a Surface object.

Parameters

  [in] | pNumXPoints | is number of data points along X dimension
  [in] | pNumYPoints | is number of data points along Y dimension
  [in] | pDataType | takes one of the values of dtype that indicates the integral data type of surface data
  [in] | pPlotType | is the render type which can be one of PlotType (valid choices are FG_PLOT_SURFACE and FG_PLOT_SCATTER)
  [in] | pMarkerType | is the type of MarkerType to draw for FG_PLOT_SCATTER plot type

## Surface() [2/3]

FGAPI Surface | ( | const Surface & | pOther | ) |

Copy constructor for surface.

Parameters

  [in] | pOther | is the surface of which we make a copy of.

## Surface() [3/3]

FGAPI Surface | ( | const fg_surface | pHandle | ) |

explicit

Construct Surface ojbect from fg_surface resource handle.

Parameters

  [in] | pHandle | is the input fg_surface resource handle

Note
  This kind of construction assumes ownership of the resource handle is released during the Surface object's destruction.

## ~Surface()

FGAPI ~Surface | ( |  | ) |

surface Destructor

## Member Function Documentation

## alphas()

FGAPI unsigned alphas | ( |  | ) | const

Get the buffer identifier for alpha values per vertex.

Returns
  alpha values buffer resource id.

## alphasSize()

FGAPI unsigned alphasSize | ( |  | ) | const

Get the alpha values buffer size in bytes.

Returns
  alpha buffer size in bytes

## colors()

FGAPI unsigned colors | ( |  | ) | const

Get the buffer identifier for color values per vertex.

Returns
  colors buffer resource id.

## colorsSize()

FGAPI unsigned colorsSize | ( |  | ) | const

Get the colors buffer size in bytes.

Returns
  colors buffer size in bytes

## get()

FGAPI fg_surface get | ( |  | ) | const

Get the handle to internal implementation of surface.

## setColor() [1/2]

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

Set the color of line graph(surface).

Parameters

  [in] | pRed | is Red component in range [0, 1]
  [in] | pGreen | is Green component in range [0, 1]
  [in] | pBlue | is Blue component in range [0, 1]
  [in] | pAlpha | is Blue component in range [0, 1]

## setColor() [2/2]

FGAPI void setColor | ( | const forge::Color | pColor | ) |

Set the color of line graph(surface).

Parameters

  [in] | pColor | takes values of forge::Color to define surface color

Examples
  cpu/surface.cpp, and opencl/surface.cpp.

## setLegend()

FGAPI void setLegend | ( | const char * | pLegend | ) |

Set surface legend.

Parameters

  [in] | pLegend |

## vertices()

FGAPI unsigned vertices | ( |  | ) | const

Get the buffer identifier for vertices.

Returns
  vertex buffer resource id.

Examples
  cpu/surface.cpp, and opencl/surface.cpp.

## verticesSize()

FGAPI unsigned verticesSize | ( |  | ) | const

Get the vertex buffer size in bytes.

Returns
  vertex buffer size in bytes

Examples
  cpu/surface.cpp, and opencl/surface.cpp.

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

- surface.h