资源简介
LabWindows CVI 3D graph控件编程 源代码
代码片段和文件信息
#include “3DGraphCtrl.h“
#include
#include
#include
#include “3DGraph.h“
static CW3DGraphLibObj_CWPlot3D plotObjHandle;
static CW3DGraphLibObj_CWPlots3D plotsObjHandle;
static CAObjHandle graphObjHandle;
static int panelHandle;
int main (int argc char *argv[])
{
if (InitCVIRTE (0 argv 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0 “3DGraph.uir“ PANEL)) < 0)
return -1;
/*=CHANGE:=============================================================*
To programmatically interact with the 3D graph you will need to first obtain
the object handle. Use this handle to register event callback functions
call methods or get and set properties of the 3D graph.
Example Code:
int i j;
HRESULT __result;
CAObjHandle graphObjHandle;
CW3DGraphLibObj_CWPlots3D plotsObjHandle;
CW3DGraphLibObj_CWPlot3D plotObjHandle;
double zMatrix[10][10];
VARIANT zMatrixV;
GetObjHandleFromActiveXCtrl (panelHandle PANEL_GRAPH3D
&graphObjHandle);
__caErrChk(CW3DGraphLib__DCWGraph3DGetPlots (graphObjHandle NULL
&plotsObjHandle));
__caErrChk(CW3DGraphLib_CWPlots3DItem (plotsObjHandle NULL
CA_VariantLong(1) &plotObjHandle));
for (i=0; i<10; i++)
for (j=0; j<10; j++)
zMatrix[i][j] = (i*i) + (j*j);
__caErrChk(CA_VariantSet2DArray (&zMatrixV CAVT_DOUBLE 10 10
zMatrix));
__caErrChk(CW3DGraphLib_CWPlot3DPlot3DSimpleSurface (plotObjHandle NULL zMatrixV
CA_DEFAULT_VAL));
Error:
CA_VariantClear(&zMatrixV);
CA_DiscardObjHandle(plotsObjHandle);
CA_DiscardObjHandle(plotObjHandle);
*==========================================================END=CHANGE=*/
GetObjHandleFromActiveXCtrl(panelHandlePANEL_GRAPH3D&graphObjHandle);
CW3DGraphLib__DCWGraph3DGetPlots(graphObjHandleNULL&plotsObjHandle);
CW3DGraphLib_CWPlots3DItem(plotsObjHandleNULLCA_VariantLong(1)&plotObjHandle);
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
CA_DiscardObjHandle(plotsObjHandle);
CA_DiscardObjHandle(plotObjHandle);
return 0;
}
int CVICALLBACK generatewave (int panel int control int event
void *callbackData int eventData1 int eventData2)
{
VARIANT GaussianNoiseV;
double GaussianNoise[20][200];
int i;
switch (event)
{
case EVENT_COMMIT:
for(i=0;i<20;i++)
{
GaussNoise(2001.0-2GaussianNoise[i]);
}
CA_VariantSet2DArray(&GaussianNoiseVCAVT_DOUBLE10200GaussianNoise);
CW3DGraphLib_CWPlot3DPlot3DSimpleSurface(plotObjHandleNULLGaussianNoiseVCA_DEFAULT_VAL);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6012 2008-07-01 12:52 3DGraph控件\3DGraph.c
文件 3340 2011-03-13 23:01 3DGraph控件\3DGraph.cws
文件 2127 2008-07-01 12:39 3DGraph控件\3DGraph.h
文件 3466 2008-07-01 10:35 3DGraph控件\3DGraph.prj
文件 11012 2008-07-01 12:39 3DGraph控件\3DGraph.uir
文件 2944541 2011-03-13 23:01 3DGraph控件\3DGraph_dbg.cdb
文件 460800 2011-03-13 23:01 3DGraph控件\3DGraph_dbg.exe
文件 1955363 2011-03-13 23:01 3DGraph控件\cvibuild.3DGraph\3DGraph.nidobj
文件 5566 2011-03-13 23:02 3DGraph控件\cvibuild.3DGraph\build.ini
文件 307 2011-03-13 23:01 3DGraph控件\cvibuild.3DGraph\dependencies.bri
文件 5048 2011-03-13 23:01 3DGraph控件\cvibuild.3DGraph\resources.res
目录 0 2011-03-13 23:02 3DGraph控件\cvibuild.3DGraph
目录 0 2011-03-13 23:01 3DGraph控件
----------- --------- ---------- ----- ----
5397582 13
- 上一篇:利用FPGA实现HDB3的编解码
- 下一篇:测试用例最全模版
相关资源
- 利用FPGA实现HDB3的编解码
- H.264的整数DCT变换编码与量化过程
- 黄金矿工as3版本demo
- dd.txt
- 利用ENVI进行植被指数提取
- 简单的windows任务管理器源代码
- AD单片机常用元件库,全
- DSP2812最小系统原理图及PCB
- windows API禁用启用窗体的关闭按钮
- qt自定义工具栏,类似word
- ibatis的dtd文件
- FriendlyARM 友善之臂 USB驱动 WIN7_64
- 微软官方-使用Windows-API操作vhd
- ezdicom图像查看软件
- 基于DSP的单相Z源逆变器的代码实现
- Devexpress 16.2.5 + 官方汉化+破解
- osgEarth35集视频教程及源码
- 继电器模块DXP工程
- Hadoop的WordCount代码
- PID演示程序
- 89c51电子数字钟 源码和电路图
- eCognition Developer 9.01 x64(含crack
- PID C 语言算法DSP2812PWM
- ssh项目demo
- 利用ASTER数据和分裂窗算法计算温度的
- SMA/DO-214AC SMB/DO-214AA SMC/DO-214AB 封装
- 语音播放WT588D一线串口
- office2007/2010word文档转pdf插件
- HMC5883L的Arduino库
- 小烦内存搜索dll
评论
共有 条评论