

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface OrientationControl
OrientationControl
is an interface for manipulating
the virtual orientation of an object in the virtual acoustical space.
Usually, the object is either the listener
via the Spectator
or a source via a SoundSource3D
.
In the case of a sound source, subinterfaces DirectivityControl
and/or MacroscopicControl
are used instead of
the superinterface OrientationControl
.
Orientation is a representation of a direction in a virtual acoustical space. Orientation can be defined in two ways by using this interface: in rotation angles around object's coordinate axes or by using orientation vectors. The initial orientation is towards the negative Zaxis updirection being towards the positive Yaxis. Both of the orientation definitions (rotation angles and orientation vectors) use this initial orientation as the reference and all the rotations are relative to this.
The default orientation of all orientation controls (whether
the application has obtained them or not) is pointing
directly towards the negative Zaxis:
frontVector = (0, 0, 1000)upVector = (0, 1000, 0)
In rotation angles this is equivalent to:
heading = 0 pitch = 0roll = 0
Control
,
DirectivityControl
,
LocationControl
Method Summary  

int[] 
getOrientationVectors()
Gets the orientation of the object using two vectors. 

void 
setOrientation(int heading,
int pitch,
int roll)
Turns the object to the new orientation. 

void 
setOrientation(int[] frontVector,
int[] aboveVector)
Turns the object to the new orientation. 
Method Detail 

void setOrientation(int heading, int pitch, int roll)
Orientation defined using rotation angles.
An implementation note: the transformation (without scaling) from heading, pitch and roll to Front and Up vectors is the following:xfront=sin(heading)*cos(pitch) yfront=sin(pitch) zfront=cos(heading)*cos(pitch) xup=sin(roll)*cos(heading)+cos(roll)*sin(pitch)*sin(heading) yup=cos(pitch)*cos(roll) zup=sin(roll)*sin(heading)+cos(roll)*cos(heading)*sin(pitch)
heading
 the rotation around the Yaxis in degreespitch
 the rotation around the Xaxis in degreesroll
 the rotation around the Zaxis in degreesvoid setOrientation(int[] frontVector, int[] aboveVector) throws IllegalArgumentException
Turns the object to the new orientation.
The orientation is specified using two vectors, one specifying the direction of the Front vector of the object in world coordinates, and another specifying the Above vector of the object. The "Right" and Up vectors of the object are calculated by first calculating the "Right" vector as the cross product of the Front vector and the Above vector, and then the Up vector as a cross product of the "Right" and Front vectors. (The magnitudes of the Front and Up vectors may be adjusted by the implementation.)
The specified vectors need not be unit vectors (i.e. normalized): they can have any nonzero magnitude.
Orientation defined using Front and Above vectors. Please notice the rightangle between Front and Up vectors, but not between Front and Above vectors.
frontVector
 a 3element array specifying the Front vector of the
object in the world coordinate systemaboveVector
 a 3element array specifying the Above vector mentioned above
IllegalArgumentException
 if any argument has fewer than or
greater than 3 elements in the array; or if any argument is the zero
vector; or if the specified vectors are parallel. (The orientation of
the object will remain unchanged.)int[] getOrientationVectors()
Gets the orientation of the object using two vectors.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
Copyright 19992011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal