Do more. Code less. Free software for GPU computing.
<scroll to top>
Namespaces | Typedefs | Functions

gfx.h File Reference

#include "defines.h"
#include "arith.h"

Go to the source code of this file.

Namespaces

namespace  af

Typedefs

typedef unsigned handle

Functions

handle trimesh (const float *d_X, const float *d_Y, const float *d_Z, const float *d_C, const unsigned npts)
Matrix Interface: Surface plot of 2D data.
Parameters:
[in]X2D matrix with which to draw simple surface plot
handle plot3d (const af::array &X)
Matrix Interface: Visualize 2D velocity field with an array of arrows
Parameters:
[in]Xmatrix containing horizontal base positions for arrows
[in]Ymatrix containing vertical base positions for arrows
[in]Umatrix containing horizontal velocity components
[in]Vmatrix containing vertical velocity components
handle arrows (const af::array &X, const af::array &Y, const af::array &U, const af::array &V)
Matrix Interface: Visualize 1D data as a line plot
Parameters:
[in]Xmatrix containing data to be visualized
[in]linestyleoptional string indicating desired characteristics of plot
handle plot (const af::array &X)
handle plot (const af::array &X, const char *linestyle)
Matrix Interface: Visualize 2D data as a line plot
Parameters:
[in]Xmatrix containing horizontal data to be visualized
[in]Ymatrix containing vertical data to be visualized
[in]linestyleoptional string indicating desired characteristics of plot
handle plot (const array &X, const array &Y)
handle plot (const array &X, const array &Y, const char *linestyle)
Matrix Interface: Visualize 3D data as scatter plot
Parameters:
[in]Xmatrix containing X data to be visualized
[in]Ymatrix containing Y data to be visualized
[in]Zmatrix containing Z data to be visualized
handle points (const af::array &X, const af::array &Y, const af::array &Z)
Matrix Interface: Visualize 3D data volume
Parameters:
[in]X3D array to be volume rendered
handle volume (const af::array &X)
Matrix Interface: Visualize 2D data as single scale image
Parameters:
[in]X2D matrix to be visualized
handle imgplot (const af::array &X)
Matrix Interface: Visualize 2D data as color image
Parameters:
[in]X3D matrix to be visualized in the following format,

  • X(span,span,0) - Red component
  • X(span,span,1) - Blue component
  • X(span,span,2) - Green component
handle rgbplot (const af::array &X)
Device pointer interface: Surface plot of 2D data.
Parameters:
[in]d_a2D device pointer to data with which to draw surface plot
[in]d_wWidth of data and surface plot
[in]d_hHeight of data and surface plot
handle plot3d (const float *d_a, const unsigned w, const unsigned h)
Device pointer interface: Visualize 2D velocity field with an array of arrows
Parameters:
[in]d_Xdevice pointer to X data containing horizontal base positions for arrows
[in]d_Ydevice pointer to Y data containing vertical base positions for arrows
[in]d_Udevice pointer to data containing horizontal velocity components
[in]d_Vdevice pointer to data containing vertical velocity components
[in]cntnumber of arrows to render in velocity plot
handle arrows (const float *d_X, const float *d_Y, const float *d_U, const float *d_V, const int cnt)
Device pointer interface: Visualize 1D data as a line plot
Parameters:
[in]d_Adevice pointer to data to be visualized
[in]lenThe length of the data to be visualized
[in]optionalparameter specifying the visual characteristics of the line plot
handle plot (const float *d_A, const unsigned len)
handle plot (const float *d_A, const unsigned len, const char *linestyle)
Device pointer interface: Visualize 3D data as a line plot
Parameters:
[in]d_Xdevice pointer to X data to be visualized
[in]d_Ydevice pointer to Y data to be visualized
[in]d_Zdevice pointer to Z data to be visualized
[in]nptsThe length of the data to be visualized
[in]linestyleOptional parameter determining the visual characteristics of the line plot
handle plot (const float *d_X, const float *d_Y, const float *d_Z, const unsigned npts)
handle plot (const float *d_X, const float *d_Y, const float *d_Z, const unsigned npts, const char *linestyle)
Device pointer interface: Visualize 3D data as a volume rendering
Parameters:
[in]d_Xdevice pointer to 3D data to be visualized
[in]wThe width of the data to be visualized
[in]hThe height of the data to be visualized
[in]dThe depth of the data to be visualized
handle volume (const float *d_X, const unsigned w, const unsigned h, const unsigned d)
Device pointer interface: Visualize 3D data as scatter plot
Parameters:
[in]d_Xdevice pointer to X component of data to be visualized
[in]d_Ydevice pointer to Y component of data to be visualized
[in]d_Zdevice pointer to Z component of data to be visualized
[in]nptsThe number of 3D points to visualize
handle points (const float *d_X, const float *d_Y, const float *d_Z, const unsigned npts)
Device pointer interface: Visualize 3D data as a colored scatter plot
Parameters:
[in]d_Xdevice pointer to X component of data to be visualized
[in]d_Ydevice pointer to Y component of data to be visualized
[in]d_Zdevice pointer to Z component of data to be visualized
[in]d_Rdevice pointer to red color component data to be visualized
[in]d_Gdevice pointer to green color component data to be visualized
[in]d_Bdevice pointer to blue color component data to be visualized
[in]nptsThe number of 3D points to visualize
handle scattercolors (const float *d_X, const float *d_Y, const float *d_Z, const float *d_R, const float *d_G, const float *d_B, const unsigned npts)
Device pointer interface: Visualize 2D data as single scale image
Parameters:
[in]d_XDevice pointer to 2D matrix to be visualized
[in]wwidth of 2D matrix to be visualized
[in]hheight of 2D matrix to be visualized
handle imgplot (const float *d_X, const unsigned w, const unsigned h)
Device pointer interface: Visualize 2D data as color image
Parameters:
[in]d_XDevice pointer to 2D matrix to be visualized.
[in]wwidth of 2D matrix to be visualized
[in]hheight of 2D matrix to be visualized
handle rgbplot (const float *d_X, const unsigned w, const unsigned h)
Enable graphics overlay plotting for composition of plots on same axis
afError keep_on ()
Disable graphics overlay plotting for composition of plots on same axis
afError keep_off ()
Create a subplot within the figure window for compositions of plots
Parameters:
[in]wHorizontal number of subfigures
[in]hVertical number of subfigures
[in]idxIndex of subfigure to activate
afError subfigure (unsigned w, unsigned h, unsigned idx)
Set global color palette
Parameters:
[in]mapString indicating the colormap to be used. May be any of the following,

  • colors
  • orange
  • gray
  • blue
  • brown
  • pink
  • white
  • sixteenbit
  • heatmap
  • magento
afError palette (const char *map)
Clear the current figure
afError clearfig ()
Force drawing of the current figure (blocking)
afError draw ()
Display a figure window
handle figure ()
Set the title of the current figure or subfigure
Parameters:
[in]strC string representing the title of the figure or subfigure
handle title (const char *str)
Display the current figure with given geometry
Parameters:
[in]xThe horizontal position of the upper left corner of the figure
[in]yThe vertical position of the upper left corner of the figure
[in]wThe width of the figure
[in]hThe height of the figure
handle figure (int x, int y, int w, int h)
Forcibly close the current figure
afError close ()

Typedef Documentation

typedef unsigned handle
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines