?? vtk.cpp
字號(hào):
// VTK.cpp: implementation of the CVTK class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "step4.h"
#include "VTK.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CVTK::CVTK()
{
render = vtkRenderer::New();
render->SetBackground(.1,.2,.3);
renWin = vtkRenderWindow::New();
renWin->AddRenderer(render);
iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
}
CVTK::~CVTK()
{
}
void CVTK::VTKToDialog(CStatic * aStatic)
{
CRect rect;
aStatic->GetClientRect(&rect);
renWin->SetSize(rect.Width(),rect.Height());
//關(guān)鍵代碼一:設(shè)置父窗口
renWin->SetParentId(aStatic->m_hWnd);
// 關(guān)鍵代碼二:開始繪制,啟動(dòng)交互器
renWin->Render();
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -