-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathArrow.h
66 lines (54 loc) · 1.66 KB
/
Arrow.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#pragma once
#ifndef ARROW_H
#define ARROW_H
#include "AxisSettingTool.h"
#include "vtkCaptionActor2D.h"
#include "VTK_Def.h"
#include <vector>
const int ARROW_SCALE = 10;
//ToothPolyData, interactor, ArrowActor, Matrix 정보를 가지고 있음
class Arrow
{
public:
vtkSmartPointer<AxisSettingTool> style;
vtkSmartPointer<vtkPolyData> appendPolydata;
vtkSmartPointer<vtkPolyData> changedPolydata;
vtkMatrix4x4* arrowMatrix;
vtkSmartPointer<vtkRenderWindowInteractor> renWinIn;
vtkSmartPointer<vtkActor> toothActor;
static vector<vtkSmartPointer<vtkFollower>> m_conLabels;
static vtkSmartPointer<vtkAssembly> movableAxes;
Arrow()
{
changedPolydata = vtkSmartPointer<vtkPolyData>::New();
arrowMatrix = vtkMatrix4x4::New();
renWinIn = vtkSmartPointer<vtkRenderWindowInteractor>::New();
toothActor = vtkSmartPointer<vtkActor>::New();
}
//축을 원점으로 변환
//polydata를 반환해줌
vtkPolyData* GetPolydata()const;
void SetPolydata(vtkPolyData*);
virtual void MakeArrow(vtkOpenGLRenderer* qtRen);
virtual void SetToothPolydataAndRenderer(vtkPolyData*, vtkOpenGLRenderer*, vtkGenericOpenGLRenderWindow*);
//축을 X,Y,Z로 180도 회전
virtual void InvertAxis(int invertNum);
//AxisLabel들의 위치를 초기 위치로 돌려놓음
void InitAixsLabels();
void SetToothPickableAndDragable(bool bPickable=true, bool bPragable=true)
{
toothActor->SetPickable(bPickable);
toothActor->SetDragable(bPragable);
toothActor->Modified();
}
void SetTrackballActorStyle()
{
renWinIn->SetInteractorStyle(style);
}
void SetStyle(vtkInteractorObserver* style)
{
renWinIn->SetInteractorStyle(style);
}
private:
};
#endif