?? q3dwebcamtxttotal.cpp
字號:
// Array_Buffer.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "Q3DWebCamTxtTotal.h"
#include<stdio.h>
#include<stdlib.h>
FILE *fp;
int a = 0, donow = 0;
ChannelType channelType;
extern "C" __declspec( dllexport ) ChannelType* __cdecl GetType() {
ZeroMemory(channelType.name, 80);
StringCbCopy(channelType.name, 79, Q3DWEBCAMTXTTOTAL_NAME);
channelType.version = Q3DWEBCAMTXTTOTAL_VERSION;
channelType.guid = Q3DWEBCAMTXTTOTAL_GUID;
channelType.baseguid = FLOAT_CHANNEL_GUID;
channelType.minimumEdition = EDITION_LEVEL_ALL; // All Quest3D Editions
return &channelType;
}
Q3DWEBCAMTXTTOTALDLL_EXPORTS
Q3DWebCamTxtTotal::Q3DWebCamTxtTotal() {
SetChannelName(Q3DWEBCAMTXTTOTAL_NAME);
//TODO: Add construction logic here
}
Q3DWebCamTxtTotal::~Q3DWebCamTxtTotal()
{
//TODO:: Add destruction logic here
}
// Overlodaed save channel
bool Q3DWebCamTxtTotal::SaveChannel(A3dFileSaver& saver) {
if(!A3d_Channel::SaveChannel(saver))
return false;
//TODO: Add your logic to save persistent data here
return true;
}
bool Q3DWebCamTxtTotal::LoadChannel(A3dFileLoader& loader, A3d_ChannelGroup *group) {
if(!A3d_Channel::LoadChannel(loader, group))
return false;
//TODO: Add your logic to load persistent data here
return true;
}
void Q3DWebCamTxtTotal::DoDependencyInit(A3d_List* currentDependList) {
//Include Visual Studio 2005 runtime libraries
AddDLLDepend("MSVCR80.DLL", currentDependList);
AddDLLDepend("MSVCP80.DLL", currentDependList);
AddDLLDepend("MSVCM80.DLL", currentDependList);
AddDLLDepend("Microsoft.VC80.CRT.manifest", currentDependList);
}
void Q3DWebCamTxtTotal::CallChannel()
{
//TODO: Add call channel logic here
if(donow == 0)
{
donow = 1;
fp = fopen("C:\\test.txt", "r");
fscanf(fp,"%d", &a);
fclose(fp);
SetFloat(a);
//engine->DMsg(a);
donow = 0;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -