VISR  0.11.8
Versatile Interactive Scene Renderer
point_source.hpp
Go to the documentation of this file.
1 /* Copyright Institute of Sound and Vibration Research - All rights reserved */
2 
3 #ifndef VISR_OBJECTMODEL_POINT_SOURCE_HPP_INCLUDED
4 #define VISR_OBJECTMODEL_POINT_SOURCE_HPP_INCLUDED
5 
6 #include "object.hpp"
7 
8 #include "export_symbols.hpp"
9 
10 namespace visr
11 {
12 namespace objectmodel
13 {
14 
18 class VISR_OBJECTMODEL_LIBRARY_SYMBOL PointSource: public Object
19 {
20 public:
21 
22  PointSource() = delete;
23 
24  explicit PointSource( ObjectId id );
25 
26  virtual ~PointSource();
27 
28  /*virtual*/ ObjectTypeId type() const override;
29 
30  /*virtual*/ std::unique_ptr<Object> clone() const override;
31 
32  Coordinate x() const { return mXPos; }
33 
34  Coordinate y() const { return mYPos; }
35 
36  Coordinate z() const { return mZPos; }
37 
43  bool channelLock() const;
44 
50  Coordinate channelLockDistance() const;
55  void setChannelLock( Coordinate newDistance = cAlwaysChannelLock ) { mChannelLockDistance = newDistance; }
56 
60  void unsetChannelLock() { setChannelLock( cNoChannelLock ); }
61 
62  void setX( Coordinate newX );
63 
64  void setY( Coordinate newY );
65 
66  void setZ( Coordinate newZ );
67 protected:
68 
69 private:
70 #if 1
71  Coordinate mXPos;
72 
73  Coordinate mYPos;
74 
75  Coordinate mZPos;
76 #else
77  Coordinate mAzimuth;
78 
79  Coordinate mElevation;
80 
81  Coordinate mRadius;
82 #endif
83 
87  Coordinate mChannelLockDistance;
88 
92  static const Coordinate cAlwaysChannelLock;
93 
97  static const Coordinate cNoChannelLock;
98 };
99 
100 } // namespace objectmodel
101 } // namespace visr
102 
103 #endif // VISR_OBJECTMODEL_POINT_SOURCE_HPP_INCLUDED
unsigned int ObjectId
Definition: object.hpp:23
void setChannelLock(Coordinate newDistance=cAlwaysChannelLock)
Definition: point_source.hpp:55
void unsetChannelLock()
Definition: point_source.hpp:60
Definition: point_source.hpp:18
ObjectTypeId
Definition: object_type.hpp:26
Definition: options.cpp:10
Coordinate y() const
Definition: point_source.hpp:34
Coordinate x() const
Definition: point_source.hpp:32
Definition: object.hpp:36
float Coordinate
Definition: object.hpp:46
Coordinate z() const
Definition: point_source.hpp:36