Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a generic panning direction. More...
#include <omSoundPanDirection.h>
Public Member Functions | |
PanDirection () | |
Create a panning which has a directivity and spread of 0 and direction (0,0,-1), straight ahead. More... | |
PanDirection (const Vector2f &newDirection, Float newDirectivity=Float(0), Float newSpread=Float(0)) | |
Create a new panning direction with the specified 2D direction vector, directivity, and spread factor. More... | |
PanDirection (const Vector3f &newDirection, Float newDirectivity=Float(0), Float newSpread=Float(0)) | |
Create a new panning direction with the specified 3D direction vector, directivity, and spread factor. More... | |
const Vector3f & | getDirection () const |
Return a reference to the 3D direction vector for this panning direction object. More... | |
void | setDirection (const Vector2f &newDirection) |
Set the 2D direction vector for this panning direction object. More... | |
void | setDirection (const Vector3f &newDirection) |
Set the 3D direction vector for this panning direction object. More... | |
Float | getDirectivity () const |
Return the directivity for this panning direction object. More... | |
void | setDirectivity (Float newDirectivity) |
Set the directivity for this panning direction object. More... | |
Float | getSpread () const |
Return the spread for this panning direction object. More... | |
void | setSpread (Float newSpread) |
Set the spread for this panning direction object. More... | |
A class that represents a generic panning direction.
This class contains a 3D vector representing the panning direction, a 'directivity' value that indicates how localized the panning direction is, and a 'spread' value that indicates how spread out the panned sound field is.
The panning direction uses coordinates where the -z axis is the forward direction, the x axis points the right, and the y axis points up. If 2D pan directions are used, the direction is specified as a 2D vector defined as (X,Z) and contains the X and Z components of a 3D direction.
The panning directivity ranges from 0 to 1. A value of 0 indicates that the original channel layout for the source audio is kept intact and the channels are merely rotated around the listener by the pannning direction. A value of 1 indicates that all source audio channels are to be clustered in the panning direction. Values inbetween 0 and 1 cause the source channels to cluster closer towards the panning direction the closer the directivity gets to 1.
The panning spread ranges from 0 to 1 and indicates how far each source audio channel spreads out around the panning sphere. A value of 0 indicates that the sound from each source channel should be as localized as possible, while a value of 1 indicates that the source channels should be spread up to +-180 degrees from the actual source channel position.
|
inline |
Create a panning which has a directivity and spread of 0 and direction (0,0,-1), straight ahead.
|
inline |
Create a new panning direction with the specified 2D direction vector, directivity, and spread factor.
The 2D vector is specified where X+ = right and Y- = front. This corresponds to the XZ coordinates of a 3D right-handed coordinate system, projected into the listener's local horizontal plane.
|
inline |
Create a new panning direction with the specified 3D direction vector, directivity, and spread factor.
The 3D vector is specified where X+ = right and Y+ = up and Z- = front. This corresponds to the XYZ coordinates of a 3D right-handed coordinate system, projected into the listener's local horizontal plane.
|
inline |
Return a reference to the 3D direction vector for this panning direction object.
|
inline |
Set the 2D direction vector for this panning direction object.
The 2D vector is specified where X+ = right and Y- = front. This corresponds to the XZ coordinates of a 3D right-handed coordinate system, projected into the listener's local horizontal plane.
|
inline |
Set the 3D direction vector for this panning direction object.
The 3D vector is specified where X+ = right and Y+ = up and Z- = front. This corresponds to the XYZ coordinates of a 3D right-handed coordinate system, projected into the listener's local horizontal plane.
|
inline |
Return the directivity for this panning direction object.
|
inline |
Set the directivity for this panning direction object.
The new directivity value is clamped to the range [0,1].
|
inline |
Return the spread for this panning direction object.
|
inline |
Set the spread for this panning direction object.
The new spread value is clamped to the range [0,1].