用vtk自己创建立体图形的方法.doc
文本预览下载声明
用vtk自己创建立体图形的方法
/*=========================================================================Program: ? Visualization ToolkitModule: ? $RCSfile: Cone.cxx,v $Copyright (c) Ken Martin, Will Schroeder, Bill LorensenAll rights reserved.See Copyright.txt or /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.========================================xt =================================*///// This example creates a polygonal model of a cone, and then renders it to// the screen. It will rotate the cone 360 degrees and then exit. The basic// setup of source - mapper - actor - renderer - renderwindow is // typical of most VTK programs.//// First include the required header files for the VTK classes we are using.#include vtkConeSource.h#include vtkPolyDataMapper.h#include vtkRenderWindow.h#include vtkCamera.h#include vtkActor.h#include vtkRenderer.h#include vtkRenderer.h#include vtkRenderWindow.h#include vtkRenderWindowInteractor.h#include vtkProperty.h#include vtkCamera.h#include vtkStructuredPointsReader.h#include vtkPiecewiseFunction.h#include vtkColorTransferFunction.h#include vtkVolumeProperty.h#include vtkColorTransferFunction.h#include vtkVolumeRayCastCompositeFunction.h#include vtkVolumeRayCastMapper.h#pragma comment (lib, vtkFiltering.lib)#pragma comment (lib, vtkRendering.lib)#pragma comment (lib, vtkIO.lib)#pragma comment (lib, vtkVolumeRendering.lib)/*=========================================================================Program: ?Visualization ToolkitModule: ?$RCSfile: volProt.cxx,v $Copyright (c) Ken Martin, W ill Schroeder, Bill LorensenAll rights reserved.See Copyright.txt or /Copyright.htm for details.?This software is distributed WITHOUT ANY WARRANTY; without even?the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR?PURPO
显示全部