OpenDAFF C++ API  v1.7
Directional Audio File Format
DAFFVizArrow.h
Go to the documentation of this file.
1 /*
2  * -------------------------------------------------------------------------------------
3  *
4  * OpenDAFF - A free, open source software package for directional audio data
5  * Copyright 2016 Institute of Technical Acoustics, RWTH Aachen University
6  * OpenDAFF is distributed under the Apache License Version 2.0.
7  *
8  * ------------------------------------------------------------------------------------
9  *
10  */
11 
12 #ifndef IW_DAFF_ARROW
13 #define IW_DAFF_ARROW
14 
15 #include <DAFFDefs.h>
16 #include <daffviz/DAFFVizSGNode.h>
17 
18 // Forward declarations
19 class vtkActor;
20 class vtkArrowSource;
21 class vtkPolyDataMapper;
22 
23 namespace DAFFViz
24 {
25 
27 
32  {
33  public:
35 
40  Arrow( DAFFViz::SGNode* pParentNode = NULL, double dTipLength = .15f, double dTipRadius = .06f, int iTipResolution = 36, double dShaftRadius = .02f, int iShaftResolution = 36);
41  virtual ~Arrow();
42  // --= object related methods =--
43 
45  double GetTipLength() const;
46 
48  void SetTipLength(double dLength);
49 
51  double GetTipRadius() const;
52 
54  void SetTipRadius(double dRadius);
55 
57  int GetTipResolution() const;
58 
60  void SetTipResolution(int iResolution);
61 
63  double GetShaftRadius() const;
64 
66  void SetShaftRadius(double dRadius);
67 
69  int GetShaftResolution() const;
70 
72  void SetShaftResolution(int iResolution);
73 
74 
75  // --= general methods =--
76 
78  void GetColor(double& r, double& g, double& b);
79 
81  void SetColor( double r, double g, double b);
82 
84  double GetAlpha() const;
85 
87  void SetAlpha( double a);
88 
90  void SetVisible( bool bVisible);
91 
93  bool IsVisible() const;
94 
95  private:
96  vtkSmartPointer< vtkArrowSource > m_pSource;
97  vtkSmartPointer< vtkPolyDataMapper > m_pMapper;
98  vtkSmartPointer< vtkActor > m_pActor;
99 
101  void init();
102  };
103 
104 } // End of namespace "DAFFViz"
105 
106 #endif // IW_DAFF_ARROW
#define DAFF_API
Definition: DAFFDefs.h:29
#define NULL
Definition: DAFFDefs.h:59
Base class for scene graph nodes.
Definition: DAFFVizSGNode.h:67
Simple arrow object node.
Definition: DAFFVizArrow.h:31
OpenDAFF is a project from the Institute of Technical Acoustics, RWTH Aachen University, Germany.