Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_interactor.h
Go to the documentation of this file.
1 /*
2  Copyright 2010-2020 Pierre SMARS (smars@yuntech.edu.tw)
3  This program is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 2 of the License, or
6  (at your option) any later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 #ifndef _A_INTERACTOR_H_
17 #define _A_INTERACTOR_H_
18 
19 // .NAME a_interactor
20 // .SECTION Author
21 // Pierre Smars
22 
23 #include "vtkInteractorStyleTrackballCamera.h"
24 #include <iostream>
25 #include <string>
26 
28 class VTKINTERACTIONSTYLE_EXPORT a_interactor : public vtkInteractorStyleTrackballCamera
29 {
30  public:
31  static a_interactor *New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
35  a_interactor();
36  virtual ~a_interactor() {/*this->InteractionPicker->Delete();*/}
37  inline void magnification(int val) {magnification_ = val;}
38  inline int magnification() const {return magnification_;}
39  inline void name(const std::string & name) {name_ = name;}
40  inline std::string name() const {return name_;}
41  void keep_color(const bool val = true) {keep_color_ = val;}
42  protected:
43  virtual void OnChar() override;
44  virtual void OnLeftButtonDown() override;
45  virtual void OnMiddleButtonDown() override;
46  virtual void OnMiddleButtonUp() override;
47  virtual void OnRightButtonDown() override;
48  virtual void OnRightButtonUp() override;
49  bool bg_;
52  std::string name_;
53 };
54 
55 #endif
a generic interactor
Definition: a_interactor.h:29
int magnification_
Definition: a_interactor.h:51
bool keep_color_
Definition: a_interactor.h:50
std::string name_
Definition: a_interactor.h:52
void name(const std::string &name)
Definition: a_interactor.h:39
virtual ~a_interactor()
Definition: a_interactor.h:36
void magnification(int val)
Definition: a_interactor.h:37
void keep_color(const bool val=true)
Definition: a_interactor.h:41
int magnification() const
Definition: a_interactor.h:38
std::string name() const
Definition: a_interactor.h:40
vtkTypeMacro(a_interactor, vtkInteractorStyleTrackballCamera)
std::string name
Definition: pixelpos.cxx:77