亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? vtkmdiview.cpp

?? a very goog book
?? CPP
字號:
/*=========================================================================  Program:   Visualization Toolkit  Module:    $RCSfile: vtkMDIView.cpp,v $  Language:  C++  Date:      $Date: 2003/02/06 18:20:11 $  Version:   $Revision: 1.2 $  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen   All rights reserved.  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.     This software is distributed WITHOUT ANY WARRANTY; without even      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      PURPOSE.  See the above copyright notice for more information.=========================================================================*/#include "stdafx.h"#include "vtkMDI.h"#include "vtkMDIDoc.h"#include "vtkMDIView.h"#include "vtkTextProperty.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CVtkMDIViewIMPLEMENT_DYNCREATE(CVtkMDIView, CView)BEGIN_MESSAGE_MAP(CVtkMDIView, CView)  //{{AFX_MSG_MAP(CVtkMDIView)  ON_WM_SIZE()  ON_WM_ERASEBKGND()  ON_WM_CREATE()  //}}AFX_MSG_MAP  // Standard printing commands  ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)  ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)  ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CVtkMDIView construction/destructionCVtkMDIView::CVtkMDIView(){  // Create the the renderer, window and interactor objects.  this->ren = vtkRenderer::New();  this->renWin = vtkWin32OpenGLRenderWindow::New();  this->iren = vtkWin32RenderWindowInteractor::New();    // Create the the objects used to form the visualisation.  this->Mapper = vtkDataSetMapper::New();  this->Actor = vtkActor::New();  this->txtActor = vtkActor2D::New();  this->txtMapper = vtkTextMapper::New();}CVtkMDIView::~CVtkMDIView(){  // Delete the the renderer, window and interactor objects.    this->ren->Delete();    this->iren->Delete();    this->renWin->Delete();  // Delete the the objects used to form the visualisation.  this->Mapper->Delete();  this->Actor->Delete();  this->txtActor->Delete();  this->txtMapper->Delete();}BOOL CVtkMDIView::PreCreateWindow(CREATESTRUCT& cs){  // TODO: Modify the Window class or styles here by modifying  //  the CREATESTRUCT cs  return CView::PreCreateWindow(cs);}/////////////////////////////////////////////////////////////////////////////// CVtkMDIView drawing/*! * Based on a comment from Klaus Nowikow in vtkusers list.  * <http://public.kitware.com/pipermail/vtkusers/1999-August/001852.html> * * Here we intialise the interactor and set up for printing and displaying. * * @param pDC :  * * @return void  :  */void CVtkMDIView::OnDraw(CDC* pDC){  CVtkMDIDoc* pDoc = GetDocument();  ASSERT_VALID(pDoc);  if ( !this->iren->GetInitialized() )  {    CRect rect;    this->GetClientRect(&rect);    this->iren->Initialize();    this->renWin->SetSize(rect.right-rect.left,rect.bottom-rect.top);    this->ren->ResetCamera();  }  // Invoke the pipeline  Pipeline();  if ( pDC->IsPrinting() )  {    this->BeginWaitCursor();    // Obtain the size of the printer page in pixels.    int cxPage = pDC->GetDeviceCaps(HORZRES);    int cyPage = pDC->GetDeviceCaps(VERTRES);    // Get the size of the window in pixels.    int *size = this->renWin->GetSize();    int cxWindow = size[0];    int cyWindow = size[1];    float fx = float(cxPage) / float(cxWindow);    float fy = float(cyPage) / float(cyWindow);    float scale = min(fx,fy);    int x = int(scale * float(cxWindow));    int y = int(scale * float(cyWindow));    this->renWin->SetupMemoryRendering(cxWindow, cyWindow, pDC->GetSafeHdc());    this->renWin->Render();    HDC memDC = this->renWin->GetMemoryDC();    StretchBlt(pDC->GetSafeHdc(),0,0,x,y,memDC,0,0,cxWindow,cyWindow,SRCCOPY);    this->renWin->ResumeScreenRendering();    this->EndWaitCursor();  }  else  {    this->renWin->Render();  }}/////////////////////////////////////////////////////////////////////////////// CVtkMDIView printingBOOL CVtkMDIView::OnPreparePrinting(CPrintInfo* pInfo){  // default preparation  return DoPreparePrinting(pInfo);}void CVtkMDIView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/){  // TODO: add extra initialization before printing}void CVtkMDIView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/){  // TODO: add cleanup after printing}/////////////////////////////////////////////////////////////////////////////// CVtkMDIView diagnostics#ifdef _DEBUGvoid CVtkMDIView::AssertValid() const{  CView::AssertValid();}void CVtkMDIView::Dump(CDumpContext& dc) const{  CView::Dump(dc);}CVtkMDIDoc* CVtkMDIView::GetDocument() // non-debug version is inline{  ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVtkMDIDoc)));  return (CVtkMDIDoc*)m_pDocument;}#endif //_DEBUG/////////////////////////////////////////////////////////////////////////////// CVtkMDIView message handlers/*! * Resize the render window to that of the view window. * * @param nType :  * @param cx :  * @param cy :  * * @return void  :  */void CVtkMDIView::OnSize(UINT nType, int cx, int cy) {  CView::OnSize(nType, cx, cy);    CRect rect;  this->GetClientRect(&rect);  this->renWin->SetSize(rect.right-rect.left,rect.bottom-rect.top);  }/*!  * Based on a comment from Nigel Nunn in vtkusers list.  * <http://public.kitware.com/pipermail/vtkusers/2001-May/006371.html> * * Overriding OnEraseBkgnd() stops that horrible  * flickering on resizing.  The Renderer likes to do  * such things itself!  * * @param pDC :  * * @return BOOL  :  */BOOL CVtkMDIView::OnEraseBkgnd(CDC* pDC) {  return TRUE;}/*! * Add the renderer to the vtk window and link the wiew to the vtk window. * We assume that the objects have been already  * created in the constructor. * * @param lpCreateStruct :  * * @return int  :  */int CVtkMDIView::OnCreate(LPCREATESTRUCT lpCreateStruct) {  if (CView::OnCreate(lpCreateStruct) == -1)    return -1;    this->renWin->AddRenderer(this->ren);  // setup the parent window  this->renWin->SetParentId(this->m_hWnd);  this->iren->SetRenderWindow(this->renWin);      return 0;}/*! * Allow the interactor to interact with the keyboard. * * @param message :  * @param wParam :  * @param lParam :  * * @return LRESULT  :  */LRESULT CVtkMDIView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) {  switch (message)  {    //case WM_PAINT:     case WM_LBUTTONDOWN:     case WM_LBUTTONUP:     case WM_MBUTTONDOWN:     case WM_MBUTTONUP:     case WM_RBUTTONDOWN:     case WM_RBUTTONUP:     case WM_MOUSEMOVE:    case WM_CHAR:    case WM_TIMER:      if (this->iren->GetInitialized())      {        return vtkHandleMessage2(this->m_hWnd, message, wParam, lParam, this->iren);      }      break;  }     return CView::WindowProc(message, wParam, lParam);}/*! * This is the pipeline that creates the object for  * rendering on the screen. * Here is where we create the pipeline. * We assume that the objects have been already  * created in the constructor and that the  * renderer, window and interactor have been already * initialised in OnCreate() * * @param none * * @return void  :  */void CVtkMDIView::Pipeline(){  if ( this->GetDocument()->HasAFile )  {    this->Mapper->SetInput(this->GetDocument()->Reader->GetOutput());    this->Actor->SetMapper(this->Mapper);    this->txtMapper->SetInput(this->GetDocument()->Reader->GetFileName());    this->txtMapper->GetTextProperty()->SetFontSize(12);    this->txtActor->SetMapper(this->txtMapper);    this->ren->SetBackground(0.2,0.5,0.3);    this->ren->AddActor(this->Actor);    this->ren->AddActor(this->txtActor);  }  else  {    this->txtMapper->SetInput("Hello World");    this->txtMapper->GetTextProperty()->SetFontSize(24);    this->txtActor->SetMapper(this->txtMapper);    this->ren->SetBackground(0.2,0.5,0.3);    this->ren->AddActor(this->txtActor);  }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品亚洲人在线观看| 国产精品福利一区| 秋霞影院一区二区| 欧美日韩性生活| 亚洲国产中文字幕在线视频综合| 色综合一个色综合| 亚洲九九爱视频| 欧美日韩国产首页| 蜜臀av在线播放一区二区三区 | 国产v综合v亚洲欧| 国产欧美一区二区三区鸳鸯浴| 欧美一级在线观看| 免费三级欧美电影| 精品乱人伦小说| 国产suv精品一区二区三区| 国产女同性恋一区二区| 99久久综合精品| 亚洲一区二区高清| 精品国产一区二区三区忘忧草| 国产精品12区| 亚洲欧洲av在线| 欧美日韩一区成人| 国产在线播放一区| 亚洲精选一二三| 欧美一级久久久| 国产.精品.日韩.另类.中文.在线.播放| 国产精品妹子av| 欧美丝袜自拍制服另类| 国内精品久久久久影院薰衣草| 国产精品每日更新在线播放网址| 欧美一a一片一级一片| 激情丁香综合五月| 亚洲一区二区欧美激情| 精品福利av导航| 在线亚洲精品福利网址导航| 日韩国产精品久久久| 国产精品入口麻豆九色| 精品视频123区在线观看| 国产盗摄视频一区二区三区| 亚洲自拍偷拍网站| 国产日韩精品久久久| 欧美精品色一区二区三区| 国产福利一区二区三区在线视频| 亚洲激情图片一区| 久久久精品综合| 在线播放亚洲一区| 一本大道av一区二区在线播放 | 欧美日韩精品系列| 成人美女视频在线观看18| 亚洲小少妇裸体bbw| 久久久久久久久久久久电影 | 国产高清精品在线| 午夜电影网亚洲视频| 国产精品久久久久久妇女6080| 欧美日韩一本到| 99国内精品久久| 日韩va欧美va亚洲va久久| 亚洲欧美影音先锋| 久久蜜桃av一区精品变态类天堂 | 日本在线不卡一区| 国产免费成人在线视频| 91麻豆蜜桃一区二区三区| 久久久久成人黄色影片| 91社区在线播放| 成人精品免费视频| 国产免费成人在线视频| 99九九99九九九视频精品| 天天色图综合网| 国产精品久久久久久久久免费桃花| 国产一区二区三区在线观看免费 | 欧美日韩激情一区二区| 91亚洲男人天堂| 成人看片黄a免费看在线| 亚洲v日本v欧美v久久精品| 国产精品免费视频网站| 久久精品男人的天堂| 欧美一区二区免费观在线| 精品视频在线看| 欧美亚洲一区二区在线观看| 成人不卡免费av| 成人v精品蜜桃久久一区| 成人在线视频首页| 色婷婷亚洲婷婷| 偷窥国产亚洲免费视频| 欧美激情在线观看视频免费| 欧美色图第一页| 成人国产电影网| 久久国产人妖系列| 一卡二卡欧美日韩| 一区二区中文字幕在线| 欧美日韩一区二区欧美激情| 成年人午夜久久久| 国产传媒久久文化传媒| 久久精品国产免费| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲激情图片一区| 亚洲精品菠萝久久久久久久| 日本一区二区三区在线不卡| 精品入口麻豆88视频| 3atv一区二区三区| 51精品久久久久久久蜜臀| 国产成都精品91一区二区三| 激情综合色丁香一区二区| 美女高潮久久久| 免费人成精品欧美精品| 国产一区二三区| 亚洲成人精品在线观看| 欧美一卡二卡在线观看| 91国在线观看| 欧美色手机在线观看| 欧美电影免费提供在线观看| 另类人妖一区二区av| 国产香蕉久久精品综合网| 亚洲啪啪综合av一区二区三区| 亚洲国产日日夜夜| 激情另类小说区图片区视频区| 成人av电影在线| 欧美日韩国产另类一区| 久久久久亚洲蜜桃| 有码一区二区三区| 美女精品一区二区| 一本色道久久加勒比精品| 一本到一区二区三区| 国产亚洲成年网址在线观看| 成人h动漫精品| 自拍偷拍亚洲激情| 日韩电影一区二区三区四区| 国产成人精品一区二区三区网站观看| 91色在线porny| 欧美电影免费观看高清完整版在| 国产精品女主播av| 日本91福利区| 91理论电影在线观看| 精品国产1区二区| 亚洲永久精品大片| 国产成人激情av| 欧美浪妇xxxx高跟鞋交| 中文字幕欧美区| 奇米影视在线99精品| 色婷婷av一区二区三区gif| 久久久久久久综合| 日韩不卡一区二区| 色乱码一区二区三区88| 久久蜜臀中文字幕| 奇米精品一区二区三区在线观看| 色婷婷综合激情| 中文字幕在线不卡视频| 韩国在线一区二区| 欧美一区欧美二区| 午夜a成v人精品| 色婷婷一区二区| 中文字幕一区二区三区在线观看 | 国产嫩草影院久久久久| 蜜臀久久99精品久久久画质超高清| 91成人免费网站| 中文字幕制服丝袜一区二区三区 | 精品不卡在线视频| 婷婷一区二区三区| 欧洲中文字幕精品| 亚洲美女免费在线| 91香蕉视频mp4| 国产精品情趣视频| 成人高清在线视频| 午夜精彩视频在线观看不卡| 色婷婷综合五月| 亚洲精品高清在线| 福利一区在线观看| 国产无一区二区| 国产成人av福利| 26uuu色噜噜精品一区二区| 久久成人免费网站| 精品少妇一区二区三区 | 久久亚洲免费视频| 理论片日本一区| 精品国产免费人成在线观看| 久久成人久久鬼色| 精品免费99久久| 韩国中文字幕2020精品| 国产校园另类小说区| 成人h版在线观看| 亚洲欧美色图小说| 欧美性受极品xxxx喷水| 亚洲国产一区二区a毛片| 欧美丝袜丝交足nylons| 日韩不卡手机在线v区| 精品成人私密视频| 不卡的看片网站| 亚洲免费观看在线观看| 欧美性大战久久久久久久蜜臀| 五月激情六月综合| 日韩精品专区在线影院重磅| 激情五月激情综合网| 国产精品国产三级国产aⅴ入口| 成人高清视频在线观看| 亚洲一区av在线| 欧美xxxxx裸体时装秀| 国产999精品久久久久久| 综合亚洲深深色噜噜狠狠网站| 在线观看国产日韩| 免费不卡在线视频|