VectorField Class Reference

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

`#include <vector_field.h>`

## Public Member Functions

FGAPI | VectorField (const unsigned pNumPoints, const dtype pDataType, const ChartType pChartType)
| Creates a VectorField object.
FGAPI | VectorField (const VectorField &pOther)
| Copy constructor for VectorField.
FGAPI | VectorField (const fg_vector_field pHandle)
| Construct VectorField ojbect from fg_vector_field resource handle.
FGAPI | ~VectorField ()
| VectorField Destructor.
FGAPI void | setColor (const forge::Color pColor)
| Set global color for the field lines.
FGAPI void | setColor (const float pRed, const float pGreen, const float pBlue, const float pAlpha)
| Set global color for the field lines.
FGAPI void | setLegend (const char *pLegend)
| Set VectorField 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 | directions () const
| Get the buffer identifier for field direction per vertex values.
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 unsigned | directionsSize () const
| Get the directions buffer size.
FGAPI fg_vector_field | get () const
| Get the handle to internal implementation of VectorField.

## Detailed Description

VectorField is a line graph to display two dimensional data.

Examples
  cpu/field.cpp, cpu/stream.cpp, opencl/field.cpp, and opencl/stream.cpp.

## Constructor & Destructor Documentation

## VectorField() [1/3]

FGAPI VectorField | ( | const unsigned | pNumPoints,
|  | const dtype | pDataType,
|  | const ChartType | pChartType )

Creates a VectorField object.

Parameters

  [in] | pNumPoints | is number of data points to display
  [in] | pDataType | takes one of the values of dtype that indicates the integral data type of VectorField data
  [in] | pChartType | dictates the dimensionality of the chart

## VectorField() [2/3]

FGAPI VectorField | ( | const VectorField & | pOther | ) |

Copy constructor for VectorField.

Parameters

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

## VectorField() [3/3]

FGAPI VectorField | ( | const fg_vector_field | pHandle | ) |

explicit

Construct VectorField ojbect from fg_vector_field resource handle.

Parameters

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

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

## ~VectorField()

FGAPI ~VectorField | ( |  | ) |

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

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

## colorsSize()

FGAPI unsigned colorsSize | ( |  | ) | const

Get the colors buffer size in bytes.

Returns
  colors buffer size in bytes

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

## directions()

FGAPI unsigned directions | ( |  | ) | const

Get the buffer identifier for field direction per vertex values.

Returns
  directions buffer resource id

Examples
  cpu/field.cpp, cpu/stream.cpp, opencl/field.cpp, and opencl/stream.cpp.

## directionsSize()

FGAPI unsigned directionsSize | ( |  | ) | const

Get the directions buffer size.

Returns
  directions buffer size in bytes

Examples
  cpu/field.cpp, cpu/stream.cpp, opencl/field.cpp, and opencl/stream.cpp.

## get()

FGAPI fg_vector_field get | ( |  | ) | const

Get the handle to internal implementation of VectorField.

## setColor() [1/2]

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

Set global color for the field lines.

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 global color for the field lines.

Parameters

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

Examples
  cpu/field.cpp, cpu/stream.cpp, opencl/field.cpp, and opencl/stream.cpp.

## setLegend()

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

Set VectorField legend.

Parameters

  [in] | pLegend |

## vertices()

FGAPI unsigned vertices | ( |  | ) | const

Get the buffer identifier for vertices.

Returns
  vertex buffer resource id.

Examples
  cpu/field.cpp, cpu/stream.cpp, opencl/field.cpp, and opencl/stream.cpp.

## verticesSize()

FGAPI unsigned verticesSize | ( |  | ) | const

Get the vertex buffer size in bytes.

Returns
  vertex buffer size in bytes

Examples
  cpu/field.cpp, cpu/stream.cpp, opencl/field.cpp, and opencl/stream.cpp.

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

- vector_field.h