-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathvtkFeature.h
104 lines (78 loc) · 2.74 KB
/
vtkFeature.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*=========================================================================
Program: Visualization Toolkit
Copyright (c) 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.
=========================================================================*/
// .NAME vtkFeature -
// .SECTION Description
//
#ifndef __vtkFeature_h
#define __vtkFeature_h
#include <vtkObject.h>
#include <vtkWeakPointer.h>
#include "vtkFeatureLayer.h"
#include "vtkmapcore_export.h"
class vtkProp;
#include <string>
class VTKMAPCORE_EXPORT vtkFeature : public vtkObject
{
public:
void PrintSelf(ostream& os, vtkIndent indent) override;
vtkTypeMacro(vtkFeature, vtkObject);
// Expecting it to EPSG codes (EPSG4326)
vtkGetStringMacro(Gcs);
vtkSetStringMacro(Gcs);
vtkGetMacro(Visibility, int);
vtkSetMacro(Visibility, int);
vtkBooleanMacro(Visibility, int);
//we hold onto a weak pointer to the current feature layer that
//we are part of
void SetLayer(vtkFeatureLayer* layer);
// Description:
// Build feature when added to the feature layer.
// Init should be called by the feature layer and
// not directly by the application code.
virtual void Init() = 0;
// Description:
// Perform any clean up operation related to rendering.
// CleanUp should be called by the feature layer and
// not directly by the application code.
virtual void CleanUp() = 0;
// Description:
// Update feature and prepare it for rendering.
// Update should be called by the feature layer and
// not directly by the application code.
virtual void Update() = 0;
// Description:
// Return boolean indicating if the feature is to be displayed,
// which is the boolean product of the feature's visibiltiy
// and the layer's visibility flags.
bool IsVisible();
// Description:
// Return vtkProp that represents feature in picking operations.
// Default is none.
virtual vtkProp* PickProp();
// Description:
// Pick all feature items at designated display coordinates.
// For external features to override.
virtual void PickItems(vtkRenderer* renderer,
int displayCoords[4],
vtkGeoMapSelection* selection);
protected:
vtkFeature();
~vtkFeature();
unsigned int Id;
int Visibility;
char* Gcs;
vtkTimeStamp BuildTime;
vtkTimeStamp UpdateTime;
vtkWeakPointer<vtkFeatureLayer> Layer;
private:
vtkFeature(const vtkFeature&); // Not implemented
vtkFeature& operator=(const vtkFeature&); // Not implemented
};
#endif // __vtkFeature_h