- // The rotation rotating from the earth centerd frame to
- // the horizontal local frame
- SGQuatd hlOr = SGQuatd::fromLonLat(_position_geod);
-
- // Rotate the x-forward, y-right, z-down coordinate system
- // into the OpenGL camera system with x-right, y-up, z-back.
- SGQuatd q(-0.5, -0.5, 0.5, 0.5);
-
- // Compute the sounds orientation and position
- // wrt the earth centered frame - that is global coorinates
- SGQuatd sc2body = hlOr*_orientation*q;
-
- sample_map_iterator sample_current = _samples.begin();
- sample_map_iterator sample_end = _samples.end();
- for ( ; sample_current != sample_end; ++sample_current ) {
- SGSoundSample *sample = sample_current->second;
- sample->set_orientation( _orientation );
- sample->set_rotation( sc2body );
- }
-}
-
-void SGSampleGroup::set_volume( float vol )
-{
- _volume = vol;
- if (_volume < 0.0) _volume = 0.0;
- if (_volume > 1.0) _volume = 1.0;
-