Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
I3DHandle Interface Referenceabstract

The I3DHandle interface represents a playback handle for 3D sources. More...

#include <I3DHandle.h>

Inheritance diagram for I3DHandle:
Inheritance graph
[legend]

Public Member Functions

virtual ~I3DHandle ()
 Destroys the handle.
 
virtual Vector3 getLocation ()=0
 Retrieves the location of the source.
 
virtual bool setLocation (const Vector3 &location)=0
 Sets the location of the source.
 
virtual Vector3 getVelocity ()=0
 Retrieves the velocity of the source.
 
virtual bool setVelocity (const Vector3 &velocity)=0
 Sets the velocity of the source.
 
virtual Quaternion getOrientation ()=0
 Retrieves the orientation of the source.
 
virtual bool setOrientation (const Quaternion &orientation)=0
 Sets the orientation of the source.
 
virtual bool isRelative ()=0
 Checks whether the source location, velocity and orientation are relative to the listener.
 
virtual bool setRelative (bool relative)=0
 Sets whether the source location, velocity and orientation are relative to the listener.
 
virtual float getVolumeMaximum ()=0
 Retrieves the maximum volume of a source.
 
virtual bool setVolumeMaximum (float volume)=0
 Sets the maximum volume of a source.
 
virtual float getVolumeMinimum ()=0
 Retrieves the minimum volume of a source.
 
virtual bool setVolumeMinimum (float volume)=0
 Sets the minimum volume of a source.
 
virtual float getDistanceMaximum ()=0
 Retrieves the maximum distance of a source.
 
virtual bool setDistanceMaximum (float distance)=0
 Sets the maximum distance of a source.
 
virtual float getDistanceReference ()=0
 Retrieves the reference distance of a source.
 
virtual bool setDistanceReference (float distance)=0
 Sets the reference distance of a source.
 
virtual float getAttenuation ()=0
 Retrieves the attenuation of a source.
 
virtual bool setAttenuation (float factor)=0
 Sets the attenuation of a source.
 
virtual float getConeAngleOuter ()=0
 Retrieves the outer opening angle of the cone of a source.
 
virtual bool setConeAngleOuter (float angle)=0
 Sets the outer opening angle of the cone of a source.
 
virtual float getConeAngleInner ()=0
 Retrieves the inner opening angle of the cone of a source.
 
virtual bool setConeAngleInner (float angle)=0
 Sets the inner opening angle of the cone of a source.
 
virtual float getConeVolumeOuter ()=0
 Retrieves the outer volume of the cone of a source.
 
virtual bool setConeVolumeOuter (float volume)=0
 Sets the outer volume of the cone of a source.
 

Detailed Description

The I3DHandle interface represents a playback handle for 3D sources.

If the playback IDevice class also implements the I3DDevice interface then all playback IHandle instances also implement this interface.

The interface has been modelled after the OpenAL 1.1 API, see the OpenAL Specification for lots of details.

Member Function Documentation

◆ getAttenuation()

virtual float I3DHandle::getAttenuation ( )
pure virtual

Retrieves the attenuation of a source.

Returns
The attenuation.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getConeAngleInner()

virtual float I3DHandle::getConeAngleInner ( )
pure virtual

Retrieves the inner opening angle of the cone of a source.

The volume inside this cone is unaltered.

Returns
The inner angle of the cone.
Note
This angle is defined in degrees.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getConeAngleOuter()

virtual float I3DHandle::getConeAngleOuter ( )
pure virtual

Retrieves the outer opening angle of the cone of a source.

Returns
The outer angle of the cone.
Note
This angle is defined in degrees.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getConeVolumeOuter()

virtual float I3DHandle::getConeVolumeOuter ( )
pure virtual

Retrieves the outer volume of the cone of a source.

The volume between inner and outer angle is interpolated between inner volume and this value.

Returns
The outer volume of the cone.
Note
The general volume of the handle still applies on top of this.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getDistanceMaximum()

virtual float I3DHandle::getDistanceMaximum ( )
pure virtual

Retrieves the maximum distance of a source.

If a source is further away from the reader than this distance, the volume will automatically be set to 0.

Returns
The maximum distance.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getDistanceReference()

virtual float I3DHandle::getDistanceReference ( )
pure virtual

Retrieves the reference distance of a source.

Returns
The reference distance.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getLocation()

virtual Vector3 I3DHandle::getLocation ( )
pure virtual

Retrieves the location of the source.

Returns
The location.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getOrientation()

virtual Quaternion I3DHandle::getOrientation ( )
pure virtual

Retrieves the orientation of the source.

Returns
The orientation as quaternion.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getVelocity()

virtual Vector3 I3DHandle::getVelocity ( )
pure virtual

Retrieves the velocity of the source.

Returns
The velocity.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getVolumeMaximum()

virtual float I3DHandle::getVolumeMaximum ( )
pure virtual

Retrieves the maximum volume of a source.

Returns
The maximum volume.

Implemented in SoftwareDevice::SoftwareHandle.

◆ getVolumeMinimum()

virtual float I3DHandle::getVolumeMinimum ( )
pure virtual

Retrieves the minimum volume of a source.

Returns
The minimum volume.

Implemented in SoftwareDevice::SoftwareHandle.

◆ isRelative()

virtual bool I3DHandle::isRelative ( )
pure virtual

Checks whether the source location, velocity and orientation are relative to the listener.

Returns
Whether the source is relative.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setAttenuation()

virtual bool I3DHandle::setAttenuation ( float factor)
pure virtual

Sets the attenuation of a source.

This value is used for distance calculation.

Parameters
factorThe new attenuation.
Returns
Whether the action succeeded.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setConeAngleInner()

virtual bool I3DHandle::setConeAngleInner ( float angle)
pure virtual

Sets the inner opening angle of the cone of a source.

The volume inside this cone is unaltered.

Parameters
angleThe new inner angle of the cone.
Returns
Whether the action succeeded.
Note
This angle is defined in degrees.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setConeAngleOuter()

virtual bool I3DHandle::setConeAngleOuter ( float angle)
pure virtual

Sets the outer opening angle of the cone of a source.

Parameters
angleThe new outer angle of the cone.
Returns
Whether the action succeeded.
Note
This angle is defined in degrees.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setConeVolumeOuter()

virtual bool I3DHandle::setConeVolumeOuter ( float volume)
pure virtual

Sets the outer volume of the cone of a source.

The volume between inner and outer angle is interpolated between inner volume and this value.

Parameters
volumeThe new outer volume of the cone.
Returns
Whether the action succeeded.
Note
The general volume of the handle still applies on top of this.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setDistanceMaximum()

virtual bool I3DHandle::setDistanceMaximum ( float distance)
pure virtual

Sets the maximum distance of a source.

If a source is further away from the reader than this distance, the volume will automatically be set to 0.

Parameters
distanceThe new maximum distance.
Returns
Whether the action succeeded.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setDistanceReference()

virtual bool I3DHandle::setDistanceReference ( float distance)
pure virtual

Sets the reference distance of a source.

Parameters
distanceThe new reference distance.
Returns
Whether the action succeeded.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setLocation()

virtual bool I3DHandle::setLocation ( const Vector3 & location)
pure virtual

Sets the location of the source.

Parameters
locationThe new location.
Returns
Whether the action succeeded.
Note
The location is not updated with the velocity and remains constant until the next call of this method.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setOrientation()

virtual bool I3DHandle::setOrientation ( const Quaternion & orientation)
pure virtual

Sets the orientation of the source.

Parameters
orientationThe new orientation as quaternion.
Returns
Whether the action succeeded.
Note
The coordinate system used is right handed and the source by default is oriented looking in the negative z direction with the positive y axis as up direction.
This setting currently only affects sounds with non-default cone settings.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setRelative()

virtual bool I3DHandle::setRelative ( bool relative)
pure virtual

Sets whether the source location, velocity and orientation are relative to the listener.

Parameters
relativeWhether the source is relative.
Returns
Whether the action succeeded.
Note
The default value is true as this setting is used to play sounds ordinarily without 3D.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setVelocity()

virtual bool I3DHandle::setVelocity ( const Vector3 & velocity)
pure virtual

Sets the velocity of the source.

Parameters
velocityThe new velocity.
Returns
Whether the action succeeded.
Note
This velocity does not change the position of the listener over time, it is simply used for the calculation of the doppler effect.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setVolumeMaximum()

virtual bool I3DHandle::setVolumeMaximum ( float volume)
pure virtual

Sets the maximum volume of a source.

Parameters
volumeThe new maximum volume.
Returns
Whether the action succeeded.

Implemented in SoftwareDevice::SoftwareHandle.

◆ setVolumeMinimum()

virtual bool I3DHandle::setVolumeMinimum ( float volume)
pure virtual

Sets the minimum volume of a source.

Parameters
volumeThe new minimum volume.
Returns
Whether the action succeeded.

Implemented in SoftwareDevice::SoftwareHandle.


The documentation for this interface was generated from the following file: