| Miles Sound System SDK 7.2a |
The function AIL_set_sample_3D_orientation specifies the orientation of a 3D sample.
void AIL_set_sample_3D_orientation( HSAMPLE S, F32 X_face, F32 Y_face, F32 Z_face, F32 X_up, F32 Y_up, F32 Z_up ); |
Orientation is specified with two vectors. The facing vector tells which direction the object is facing (where a character's nose is pointing, for instance), and the upward vector is the vector pointing upward out of the top of the 3D object (out the top of the character's head).
The facing vector and upward vector should always be at right angles to each other. They will be normalized internally by MSS; you do not need to normalize them yourself.
Following DirectSound3D's somewhat-awkward lead, Miles uses the left-handed coordinate system. All of DirectX also uses left-handed coordinates, so passing in coordinates from a DirectX application is simple. OpenGL, on the other hand, cleanly uses right-handed coordinates, so you must invert the sign of the Z parameter before passing it into Miles.
Example files that use this function: examms.cpp
Group:
Digital Audio Services
Related Functions:
AIL_sample_3D_orientation, AIL_set_sample_3D_position, AIL_set_sample_3D_velocity, AIL_set_sample_3D_velocity_vector
Related Basic Types:
F32, HSAMPLE, void
Related FAQs:
How do I use multi-channel sound output in Miles?, What's the best way to port my older Miles application to MSS 7?
For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.