+printf("ori: %f %f %f\n", _orivec[0], _orivec[1], _orivec[2]);
+
+ orient = SGQuatd::fromRealImag(0, _relative_pos) * _orientation;
+ _absolute_pos = -SGVec3d::fromGeod(_base_pos); // -orient.rotate(SGVec3d::e1());
+printf("pos: %f %f %f\n", _absolute_pos[0], _absolute_pos[1], _absolute_pos[2]);
+}
+
+string SGSoundSample::random_string() {
+ static const char *r = "0123456789abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ string rstr;
+ for (int i=0; i<10; i++) {
+ rstr.push_back( r[rand() % strlen(r)] );
+ }