/*编程环境VS2013+VTK7.1,By yyy 2017.11.7*/
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkCylinderSource.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkProperty.h>
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
int main()
{
vtkSmartPointer<vtkCylinderSource>cylinder =
vtkSmartPointer<vtkCylinderSource>::New();
cylinder->SetHeight(3.0);
cylinder->SetRadius(1.0);
cylinder->SetResolution(10);
vtkSmartPointer<vtkPolyDataMapper>cylinderMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
cylinderMapper->SetInputConnection(cylinder->GetOutputPort());
vtkSmartPointer<vtkActor>cylinderActor =
vtkSmartPointer<vtk
VTK学习(四)vtk程序实例
最新推荐文章于 2024-05-30 09:48:11 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)