Forge

Public Member Functions
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. More...
FGAPI | Surface (const Surface &pOther)
| Copy constructor for surface. More...
FGAPI | Surface (const fg_surface pHandle)
| Construct Surface ojbect from fg_surface resource handle. More...
FGAPI | ~Surface ()
| surface Destructor More...
FGAPI void | setColor (const forge::Color pColor)
| Set the color of line graph(surface) More...
FGAPI void | setColor (const float pRed, const float pGreen, const float pBlue, const float pAlpha)
| Set the color of line graph(surface) More...
FGAPI void | setLegend (const char *pLegend)
| Set surface legend. 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 | 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 fg_surface | get () const
| Get the handle to internal implementation of surface. More...

## 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 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.

## ◆ setColor() [2/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]

## ◆ 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