Initial commit
[camargo/neiasound.git] / src / nSoundListener.h
1 #ifndef NSOUNDLISTENER_H
2 #define NSOUNDLISTENER_H
3
4 #include <QObject>
5 #include <QVector3D>
6
7 class nSceneCamera;
8 class nSoundSystem;
9
10 class nSoundListener : public QObject
11 {
12     Q_OBJECT
13 #ifdef NEIA
14     Q_PROPERTY(nSceneCamera * sourceCamera READ sourceCamera WRITE setSourceCamera)
15 #endif
16     Q_PROPERTY(bool updating READ isUpdating WRITE setUpdating)
17 public:
18     explicit nSoundListener(nSoundSystem * parent);
19
20 #ifdef NEIA
21     nSceneCamera * sourceCamera(){return m_camera;}
22     void setSourceCamera(nSceneCamera * cam);
23 #endif
24
25     bool isUpdating(){return m_updating;}
26     void setUpdating(bool b){m_updating = b;}
27
28 signals:
29
30 public slots:
31 #ifdef NEIA
32     void cameraDestroyed();
33 #endif
34     void update(qreal frameTime);
35     void updateManual(QVector3D position, QVector3D direction, QVector3D up, QVector3D velocity);
36
37 private:
38 #ifdef NEIA
39     nSceneCamera * m_camera;
40     nVec3 m_camLastPos;
41 #endif
42     bool m_updating;
43 };
44
45 #endif // NSOUNDLISTENER_H