Packageaway3d.audio
Classpublic class SoundTransform3D
InheritanceSoundTransform3D Inheritance Object

SoundTransform3D is a convinience class that helps adjust a Soundtransform's volume and pan according position and distance of a listener and emitter object. See SimplePanVolumeDriver for the limitations of this method.



Public Properties
 PropertyDefined By
  emitter : ObjectContainer3D
SoundTransform3D
  listener : ObjectContainer3D
SoundTransform3D
  scale : Number
SoundTransform3D
  soundTransform : SoundTransform
SoundTransform3D
  volume : Number
SoundTransform3D
Public Methods
 MethodDefined By
  
SoundTransform3D(emitter:ObjectContainer3D = null, listener:ObjectContainer3D = null, volume:Number = 1, scale:Number = 1000)
Creates a new SoundTransform3D.
SoundTransform3D
  
update():void
updates the SoundTransform based on the emitter and listener.
SoundTransform3D
  
updateFromVector3D(v:Vector3D):void
udpates the SoundTransform based on the vector representing the distance and angle between the emitter and listener.
SoundTransform3D
Property Detail
emitterproperty
emitter:ObjectContainer3D


Implementation
    public function get emitter():ObjectContainer3D
    public function set emitter(value:ObjectContainer3D):void
listenerproperty 
listener:ObjectContainer3D


Implementation
    public function get listener():ObjectContainer3D
    public function set listener(value:ObjectContainer3D):void
scaleproperty 
scale:Number


Implementation
    public function get scale():Number
    public function set scale(value:Number):void
soundTransformproperty 
soundTransform:SoundTransform


Implementation
    public function get soundTransform():SoundTransform
    public function set soundTransform(value:SoundTransform):void
volumeproperty 
volume:Number


Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Constructor Detail
SoundTransform3D()Constructor
public function SoundTransform3D(emitter:ObjectContainer3D = null, listener:ObjectContainer3D = null, volume:Number = 1, scale:Number = 1000)

Creates a new SoundTransform3D.

Parameters
emitter:ObjectContainer3D (default = null) — the ObjectContainer3D from which the sound originates.
 
listener:ObjectContainer3D (default = null) — the ObjectContainer3D considered to be to position of the listener (usually, the camera)
 
volume:Number (default = 1) — the maximum volume used.
 
scale:Number (default = 1000) — the distance that the sound covers.
Method Detail
update()method
public function update():void

updates the SoundTransform based on the emitter and listener.

updateFromVector3D()method 
public function updateFromVector3D(v:Vector3D):void

udpates the SoundTransform based on the vector representing the distance and angle between the emitter and listener.

Parameters

v:Vector3D — Vector3D