OpenDAFF C++ API  v1.7
Directional Audio File Format
DAFFVizLine.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_Line
13 #define IW_DAFF_Line
14 
15 #include <daffviz/DAFFVizSGNode.h>
16 
17 // Forward declarations
18 class vtkActor;
19 class vtkLineSource;
20 class vtkPolyDataMapper;
21 
22 namespace DAFFViz
23 {
24 
26 
30  class DAFF_API Line : public DAFFViz::SGNode
31  {
32  public:
33  Line();
34  Line( double x1, double y1, double z1, double x2, double y2, double z2 );
35  Line( DAFFViz::SGNode* pParentNode, double x1, double y1, double z1, double x2, double y2, double z2 );
36  ~Line();
37 
38  // --= object related methods =--
39 
40  void GetPoint1( double& x, double& y, double& z ) const;
41  void SetPoint1( double x, double y, double z );
42 
43  void GetPoint2( double& x, double& y, double& z ) const;
44  void SetPoint2( double x, double y, double z );
45 
46 
47  // --= general methods =--
48 
50  void GetColor(double& r, double& g, double& b);
51 
53  void SetColor( double r, double g, double b );
54 
56  double GetAlpha() const;
57 
59  void SetAlpha(const double a);
60 
62  void SetVisible( bool bVisible );
63 
65  bool IsVisible() const;
66 
67  private:
68  vtkSmartPointer< vtkLineSource > m_pSource;
69  vtkSmartPointer< vtkPolyDataMapper > m_pMapper;
70  vtkSmartPointer< vtkActor > m_pActor;
71 
72  // The initializer generates dynamic objects like source, mapper, actor ...
73  void init();
74  };
75 
76 } // End of namespace "DAFFViz"
77 
78 #endif // IW_DAFF_Line
#define DAFF_API
Definition: DAFFDefs.h:29
Base class for scene graph nodes.
Definition: DAFFVizSGNode.h:67
Simple line object node.
Definition: DAFFVizLine.h:30
OpenDAFF is a project from the Institute of Technical Acoustics, RWTH Aachen University, Germany.