OpenDAFF C++ API  v1.7
Directional Audio File Format
DAFFVizSphere.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_SPHERE
13 #define IW_DAFF_SPHERE
14 
15 #include <daffviz/DAFFVizSGNode.h>
16 
17 // Forward declaration
18 class vtkActor;
19 class vtkSphereSource;
20 class vtkPolyDataMapper;
21 
22 namespace DAFFViz
23 {
24 
26 
31  {
32  public:
33  Sphere();
34  Sphere(double dRadius, int iPhiResolution, int iThetaResolution);
35  Sphere(DAFFViz::SGNode* pParentNode, double dRadius, int iPhiResolution, int iThetaResolution);
36  virtual ~Sphere();
37 
38  // --= object related methods =--
39 
40  double GetRadius() const;
41  void SetRadius(double dRadius);
42 
43  int GetPhiResolution() const;
44  void SetPhiResolution(int iResolution);
45 
46  int GetThetaResolution() const;
47  void SetThetaResolution(int iResolution);
48 
49 
50  // --= general methods =--
51 
53  void GetColor(double& r, double& g, double& b);
54 
56  void SetColor(const double r, const double g, const double b);
57 
59  double GetAlpha() const;
60 
62  void SetAlpha(const double a);
63 
65  void SetVisible(bool bVisible);
66 
68  bool IsVisible() const;
69 
70  private:
71  vtkSmartPointer< vtkSphereSource > m_pSource;
72  vtkSmartPointer< vtkPolyDataMapper > m_pMapper;
73  vtkSmartPointer< vtkActor > m_pActor;
74 
75  // The initializer generates dynamic objects like source, mapper, actor ...
76  void init();
77  };
78 
79 } // End of namespace "DAFFViz"
80 
81 #endif // IW_DAFF_SPHERE
#define DAFF_API
Definition: DAFFDefs.h:29
Simple sphere object node.
Definition: DAFFVizSphere.h:30
Base class for scene graph nodes.
Definition: DAFFVizSGNode.h:67
OpenDAFF is a project from the Institute of Technical Acoustics, RWTH Aachen University, Germany.