SB AWE32 Developer's Information Pack
PART V 3D Positional Audio API
••
109
Copyright
Creative Technology Ltd., 1994-1996
Version 3.00
*/
yaw_f = DEG2RAD * (float) yaw;
pitch_f = DEG2RAD * (float) pitch;
roll_f = DEG2RAD * (float) roll;
/*
* setup the inverse rotation matrix to handle yaw, pitch, and roll
*/
thisRx.a[0] = cos(yaw_f)*cos(pitch_f);
thisRx.a[1] = sin(yaw_f)*cos(pitch_f);
thisRx.a[2] = -sin(pitch_f);
thisRx.a[3] = -sin(yaw_f)*cos(roll_f) +
cos(yaw_f)*sin(pitch_f)*sin(roll_f);
thisRx.a[4] = cos(yaw_f)*cos(roll_f) +
sin(yaw_f)*sin(pitch_f)*sin(roll_f);
thisRx.a[5] = cos(pitch_f)*sin(roll_f);
thisRx.a[6] = sin(yaw_f)*sin(roll_f) +
cos(yaw_f)*sin(pitch_f)*cos(roll_f);
thisRx.a[7] = -cos(yaw_f)*sin(roll_f) +
sin(yaw_f)*sin(pitch_f)*cos(roll_f);
thisRx.a[8] = cos(pitch_f)*cos(roll_f);
/*
* loop over the emitters letting them use the new orientation
*/
for ( i = 0; i < NUMBER_OF_EMITTERS; i++ )
setEmitterPosition( &Em[i], Em[i].x, Em[i].y, Em[i].z );
}