]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.hxx
make the relative positions fixed against the body again.
[simgear.git] / simgear / sound / soundmgr_openal.hxx
index 1be7eebdcd74700dc232aebc0e0c33e6e1dafbcc..ecfd2637f87ed41adffa4f505afc4e713640a5bc 100644 (file)
@@ -153,11 +153,15 @@ public:
     SGSampleGroup *find( const string& refname, bool create = false );
 
     /**
-     * Set the Geodetic position of the sound manager.
+     * Set the Cartesian position of the sound manager.
      * @param pos OpenAL listener position
      */
-    void set_position_geod( const SGGeod& pos ) {
-        _position_geod = pos; _changed = true;
+    void set_position( const SGVec3d& pos ) {
+        _base_pos = pos; _changed = true;
+    }
+
+    void set_position_offset( const SGVec3d& pos ) {
+        _offset_pos = pos; _changed = true;
     }
 
     /**
@@ -166,7 +170,6 @@ public:
      * @return OpenAL listener position
      */
     SGVec3d& get_position() { return _absolute_pos; }
-    SGGeod& get_position_geod() { return _position_geod; }
 
     /**
      * Set the velocity vector (in meters per second) of the sound manager
@@ -281,8 +284,9 @@ private:
     ALCcontext *_context;
 
     // Position of the listener.
-    SGGeod _position_geod;
     SGVec3d _absolute_pos;
+    SGVec3d _offset_pos;
+    SGVec3d _base_pos;
 
     // Velocity of the listener.
     SGVec3f _velocity;