-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (33 loc) · 857 Bytes
/
Copy pathmain.cpp
File metadata and controls
40 lines (33 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <iostream>
#include <vtkRenderer.h>
#include <vtkTransformCoordinateSystems.h>
#include <vtkPointSet.h>
#include <vtkPlaneSource.h>
#include <vtkPlane.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkCamera.h>
#include <vtkMatrix4x4.h>
#include <vtkNew.h>
#include "vtkCommand.h"
#include "vtkMap.h"
#include "vtkCallbackCommand.h"
#include "vtkRendererCollection.h"
using namespace std;
int main()
{
vtkNew<vtkMap> map;
vtkNew<vtkRenderer> rend;
map->SetRenderer(rend.GetPointer());
map->SetCenter(0, 0);
map->SetZoom(2);
vtkNew<vtkRenderWindow> wind;
wind->AddRenderer(rend.GetPointer());
wind->SetSize(1300, 700);
vtkNew<vtkRenderWindowInteractor> intr;
intr->SetRenderWindow(wind.GetPointer());
map->Draw();
intr->Start();
}