]> 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 8cba4ac7b7b9a67cce93bf1c1e790d67c720afab..ecfd2637f87ed41adffa4f505afc4e713640a5bc 100644 (file)
@@ -153,15 +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 ) {
-        _position_offs = pos; _changed = true;
+        _offset_pos = pos; _changed = true;
     }
 
     /**
@@ -191,8 +191,8 @@ public:
      * Set the orientation of the sound manager
      * @param ori Quaternation containing the orientation information
      */
-    void set_orientation( const SGQuatd& ori, const SGQuatd& offs ) {
-        _orientation = ori; _orient_offs = offs; _changed = true;
+    void set_orientation( const SGQuatd& ori ) {
+        _orientation = ori; _changed = true;
     }
 
     /**
@@ -200,7 +200,6 @@ public:
      * @return Quaternation containing the orientation information
      */
     inline const SGQuatd& get_orientation() { return _orientation; }
-    inline const SGQuatd& get_orientation_offset() { return _orient_offs; }
 
     /**
      * Get the direction vector of the sound manager
@@ -285,9 +284,9 @@ private:
     ALCcontext *_context;
 
     // Position of the listener.
-    SGGeod _position_geod;
-    SGVec3d _position_offs;
     SGVec3d _absolute_pos;
+    SGVec3d _offset_pos;
+    SGVec3d _base_pos;
 
     // Velocity of the listener.
     SGVec3f _velocity;
@@ -295,7 +294,6 @@ private:
     // Orientation of the listener. 
     // first 3 elements are "at" vector, second 3 are "up" vector
     SGQuatd _orientation;
-    SGQuatd _orient_offs;
     ALfloat _at_up_vec[6];
 
     sample_group_map _sample_groups;