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

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]pNumPointsis number of data points to display
[in]pDataTypetakes one of the values of dtype that indicates the integral data type of VectorField data
[in]pChartTypedictates the dimensionality of the chart

◆ VectorField() [2/3]

FGAPI VectorField ( const VectorField pOther)

Copy constructor for VectorField.

Parameters
[in]pOtheris 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]pHandleis 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()

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 forge::Color  pColor)

Set global color for the field lines.

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

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

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: