Admin Production ni-theme
Current Publication

OGLPlot3DScatter

LabWindows/CVI

OGLPlot3DScatter

int OGLPlot3DScatter (int panelHandle, int OGLControlId, const void *arrayOfXYZValues, int numberOfXPoints, int numberOfYPoints, int dataType);

Purpose

Creates a 3D scatter plot on the specified OGL control.

Note   The plot will not be displayed until the next call to OGLRefreshGraph even if the the plot is not set to be invisible.

Parameters

Input
Name Type Description
panelHandle int The specifier for a particular panel that is currently in memory.

This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
OGLControlId int The ID returned by OGLNewCtrl or OGLConvertCtrl.
arrayOfXYZValues const void * The array of coordinate values that are to be plotted.

The type of the array is decided by the data type that is passed to the function. The following table lists the data types and the associated data structure types.

data type data structure


character OGLVertexC
short integer OGLVertexSI
integer OGLVertexI
unsigned character OGLVertexUC
unsigned short integer OGLVertexUSI
unsigned integer OGLVertexUI
float OGLVertexF
double OGLVertexD
numberOfXPoints int Size of the row dimension of the array.
numberOfYPoints int Size of the column dimension of the array.
dataType int Specifies the data type of the XYZ Array.

Valid Data Types:

character OGLVAL_CHAR
short integer OGLVAL_SHORT_INTEGER
integer OGLVAL_INTEGER
float OGLVAL_FLOAT
double-precision OGLVAL_DOUBLE
unsigned short integer OGLVAL_UNSIGNED_SHORT_INTEGER
unsigned integer OGLVAL_UNSIGNED_INTEGER
unsigned character OGLVAL_UNSIGNED_CHAR

Return Value

Name Type Description
plotHandle int Returns the handle used to specify this plot in subsequent function calls. Negative values indicate that an error occurred.

Error Codes

–1 to –999 A User Interface Library error code. (constants are available in userint.h)
–1001 The panel is a child panel.
–1002 No window system handle for panel.
–1003 Only a canvas or picture can be converted into an OGL control.
–1004 Error registering window.
–1005 Error creating window.
–1006 The OGL control could not be found.
–1007 Too many controls.
–1008 The OGL plot could not be found.
–1009 Too many plots.
–1010 The label attribute could not be obtained.
–1011 Could not hide the control.
–1012 Could not unhide the control.
–1013 Could not move the control.
–1014 Could not resize the control.
–1015 Invalid parameters passed to the function.
–1016 The attribute is an invalid OGL control attribute.
–1017 The attribute is an invalid OGL plot attribute.
–1018 The last operation caused an OpenGL error. Use OGLGetLastOpenGLError to get the error code.
–1019 The last operation caused a Windows error. Use GetLastError to get the error code.
–1020 The font name is too long.
–1021 The attribute value cannot be set.
–1022 Not enough memory.
–1023 Could not set the context.
–1024 Could not restore the context.
–1025 The control was created by another thread.
–1026 The data type passed to this function was invalid.
–1027 Trying to get an uninitialized or zero length array attribute.
–1028 The function has to be called from the main thread.
–1029 The control is already being refreshed.
–1030 The pixel depth cannot be less than 8 bits (256 colors).

Additional Information

Library: OpenGL 3D Plotting Control

Include file: custctrl\cviogl.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later

Example

Refer to userint\custctrl\cviogl\ogldemo.cws for an example of using the OGLPlot3DScatter function.