Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 1 - SoundSprocket / SoundSprocket Reference
SoundSprocket Functions / Creating and Managing 3D Sound Sources


SSpSource_SetUpVector

You can use the SSpSource_SetUpVector function to set the up vector of a sound source.

OSStatus SSpSource_SetUpVector (
SSpSourceReference inSourceReference,
const TQ3Vector3D *inUpVector);
inSourceReference
A source reference.
inUpVector
The desired untransformed up vector of the sound source. This up vector should be a unit vector.
function result
A result code.
DESCRIPTION
The SSpSource_SetUpVector function sets the up vector of the sound source specified by the inSourceReference parameter to the vector specified by the inUpVector parameter. The inUpVector parameter specifies the untransformed up vector of the sound source (that is, the up vector of the sound source before the sound source's transform is applied). The actual up vector of the sound source is calculated at the time you call the SSpSource_CalcLocalization function. The default up vector of a sound source is the unit y vector (0, 1, 0).

SPECIAL CONSIDERATIONS
When you call SSpSource_CalcLocalization, the sound source's orientation and up vectors should not be parallel.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996