|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.geom.Vec3D
toxi.audio.SoundListener
public class SoundListener
The concept of a SoundListener refers directly to the user's instance in the virtual (audio) world. By setting the 3D position, velocity and orientation of the listener, the underlying audio hardware can produce a realistic 3D spatial sound simulation (incl. doppler effect, volume falloff etc.).
Like AudioSource
, this class extends Vec3D
and so if the
position of the listener is changed via the public x,y,z vector components,
the updatePosition()
method needs to be called afterwards in
order to reflect these changes in the OpenAL context.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class toxi.geom.Vec3D |
---|
toxi.geom.Vec3D.Axis |
Field Summary |
---|
Fields inherited from class toxi.geom.Vec3D |
---|
MAX_VALUE, MIN_VALUE, x, X_AXIS, y, Y_AXIS, z, Z_AXIS, ZERO |
Method Summary | |
---|---|
float[] |
getOrientation()
|
float[] |
getPosition()
|
float[] |
getVelocity()
|
SoundListener |
setGain(float gain)
|
SoundListener |
setOrientation(float[] o)
|
SoundListener |
setOrientation(float upX,
float upY,
float upZ,
float forwardX,
float forwardY,
float forwardZ)
|
SoundListener |
setPosition(float[] p)
|
SoundListener |
setPosition(float xx,
float yy,
float zz)
|
SoundListener |
setVelocity(float[] v)
|
SoundListener |
setVelocity(float xx,
float yy,
float zz)
|
SoundListener |
updatePosition()
|
Methods inherited from class toxi.geom.Vec3D |
---|
abs, add, add, add, addSelf, addSelf, angleBetween, angleBetween, clear, compareTo, constrain, constrain, copy, cross, cross, crossInto, crossSelf, distanceTo, distanceToSquared, dot, dot, equals, equalsWithTolerance, floor, frac, fromXYTheta, fromXZTheta, fromYZTheta, getAbs, getComponent, getComponent, getConstrained, getFloored, getFrac, getInverted, getLimited, getNormalized, getNormalizedTo, getReciprocal, getReflected, getRotatedAroundAxis, getRotatedX, getRotatedY, getRotatedZ, getSignum, hashCode, headingXY, headingXZ, headingYZ, immutable, interpolateTo, interpolateTo, interpolateTo, interpolateTo, interpolateToSelf, interpolateToSelf, invert, isInAABB, isInAABB, isMajorAxis, isZeroVector, jitter, jitter, jitter, jitter, jitter, jitter, limit, magnitude, magSquared, max, maxSelf, min, minSelf, modSelf, modSelf, normalize, normalizeTo, randomVector, randomVector, reciprocal, reflect, rotateAroundAxis, rotateX, rotateY, rotateZ, roundToAxis, scale, scale, scale, scale, scaleSelf, scaleSelf, scaleSelf, set, set, set, setComponent, setComponent, setXY, shuffle, signum, sub, sub, sub, subSelf, subSelf, to2DXY, to2DXZ, to2DYZ, toArray, toArray4, toCartesian, toSpherical, toString, x, y, z |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final float[] getOrientation()
public final float[] getPosition()
public final float[] getVelocity()
public SoundListener setGain(float gain)
public SoundListener setOrientation(float upX, float upY, float upZ, float forwardX, float forwardY, float forwardZ)
public SoundListener setOrientation(float[] o)
public SoundListener setPosition(float xx, float yy, float zz)
public SoundListener setPosition(float[] p)
public SoundListener setVelocity(float xx, float yy, float zz)
public SoundListener setVelocity(float[] v)
public SoundListener updatePosition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |