Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Member Functions | List of all members
om::sound::acoustics::contexts::GeometricAcousticContext Class Reference

A class that uses geometric sound propagation algorithms to simulate virtual acoustics. More...

#include <omGeometricAcousticContext.h>

Inheritance diagram for om::sound::acoustics::contexts::GeometricAcousticContext:
om::sound::acoustics::contexts::AcousticContext

Classes

class  Request
 A class that stores implementation-specific parameters for a geometric acoustic context. More...
 

Public Member Functions

 GeometricAcousticContext ()
 Create a new empty geometric acoustic context with the default state. More...
 
 ~GeometricAcousticContext ()
 Destroy a geometric acoustic context and release all internal resources. More...
 
virtual void update (const AcousticRequest &request, const Time &dt, AcousticResult *result=((void *) 0))
 Update the state of all listeners in the acoustic context for the specified timestep. More...
 
virtual Bool updateScene (SoundSceneID sceneID, const AcousticRequest &request, const Time &dt, AcousticResult *result=((void *) 0))
 Update the state of all listeners in the given scene for the specified timestep. More...
 
virtual Bool updateListener (SoundListenerID listenerID, const AcousticRequest &request, const Time &dt, AcousticResult *result=((void *) 0))
 Update the state of a single listener in the acoustic context for the specified timestep. More...
 
virtual SoundResult renderListener (SoundListenerID listenerID, SoundBuffer &buffer, Size numSamples)
 Render a buffer of output sound for the specified listener. More...
 
virtual Size getListenerCount () const
 Return the number of listeners there are in this acoustic context. More...
 
virtual SoundListenerID addListener (SoundListener *listener)
 Add a new sound listener to this acoustic context and return the ID of the listener in the context. More...
 
virtual Bool removeListener (SoundListenerID listenerID)
 Remove the listener with the specified ID from this acoustic context. More...
 
virtual void clearListeners ()
 Remove all listeners from this acoustic context. More...
 
virtual Size getSourceCount () const
 Return the number of sources there are in this acoustic context. More...
 
virtual SoundSourceID addSource (SoundSource *source)
 Add a new sound source to this acoustic context and return the ID of the source in the context. More...
 
virtual Bool removeSource (SoundSourceID sourceID)
 Remove the source with the specified ID from this acoustic context. More...
 
virtual void clearSources ()
 Remove all sources from this acoustic context. More...
 
virtual Size getObjectCount () const
 Return the number of objects there are in this acoustic context. More...
 
virtual SoundObjectID addObject (SoundObject *object)
 Add a new sound object to this acoustic context and return the ID of the object in the context. More...
 
virtual Bool removeObject (SoundObjectID objectID)
 Remove the object with the specified ID from this acoustic context. More...
 
virtual void clearObjects ()
 Remove all objects from this acoustic context. More...
 
virtual Size getSceneCount () const
 Return the number of scenes there are in this acoustic context. More...
 
virtual SoundSceneID addScene ()
 Add a new sound scene to this acoustic context and return the ID of the scene in the context. More...
 
virtual Bool removeScene (SoundSceneID sceneID)
 Remove the object with the specified ID from this acoustic context. More...
 
virtual void clearScenes ()
 Remove all scenes from this acoustic context. More...
 
virtual Bool addSceneObject (SoundSceneID scene, SoundObjectID object)
 Add an existing object to the scene with the given ID. More...
 
virtual Bool removeSceneObject (SoundSceneID scene, SoundObjectID object)
 Remove an existing object from the scene with the given ID. More...
 
virtual Bool addSceneSource (SoundSceneID scene, SoundSourceID source)
 Add an existing source to the scene with the given ID. More...
 
virtual Bool removeSceneSource (SoundSceneID scene, SoundSourceID source)
 Remove an existing source from the scene with the given ID. More...
 
virtual Bool addSceneListener (SoundSceneID scene, SoundListenerID listener)
 Add an existing listener to the scene with the given ID. More...
 
virtual Bool removeSceneListener (SoundSceneID scene, SoundListenerID listener)
 Remove an existing listener from the scene with the given ID. More...
 
virtual const AcousticContextDelegategetDelegate () const
 Return a reference to the delegate for this acoustic context. More...
 
virtual void setDelegate (const AcousticContextDelegate &newDelegate)
 Set the delegate for this acoustic context. More...
 
- Public Member Functions inherited from om::sound::acoustics::contexts::AcousticContext
virtual ~AcousticContext ()
 Destroy an acoustic context and release all internal resources. More...
 
virtual Size getShapeCount () const =0
 Return the number of shapes there are in this acoustic context. More...
 
virtual SoundShapeID addShape (SoundShape *shape)=0
 Add a new sound shape to this acoustic context and return the ID of the shape in the context. More...
 
virtual Bool removeShape (SoundShapeID shapeID)=0
 Remove the shape with the specified ID from this acoustic context. More...
 
virtual void clearShapes ()=0
 Remove all shapes from this acoustic context. More...
 
virtual Bool addObjectShape (SoundObjectID object, SoundShapeID shape)=0
 Add an existing shape to the object with the given ID. More...
 
virtual Bool removeObjectShape (SoundObjectID object, SoundShapeID shape)=0
 Remove an existing shape from the object with the given ID. More...
 
virtual Bool addSourceShape (SoundSourceID source, SoundShapeID shape)=0
 Add an existing shape to the source with the given ID. More...
 
virtual Bool removeSourceShape (SoundSourceID source, SoundShapeID shape)=0
 Remove an existing shape from the source with the given ID. More...
 
virtual Bool addListenerShape (SoundListenerID listener, SoundShapeID shape)=0
 Add an existing shape to the listener with the given ID. More...
 
virtual Bool removeListenerShape (SoundListenerID listener, SoundShapeID shape)=0
 Remove an existing shape from the listener with the given ID. More...
 

Additional Inherited Members

- Static Public Attributes inherited from om::sound::acoustics::contexts::AcousticContext
static const AcousticID INVALID_ID = -1
 The ID to use to represent an invalid context object ID. More...
 

Detailed Description

A class that uses geometric sound propagation algorithms to simulate virtual acoustics.

Constructor & Destructor Documentation

om::sound::acoustics::contexts::GeometricAcousticContext::GeometricAcousticContext ( )

Create a new empty geometric acoustic context with the default state.

om::sound::acoustics::contexts::GeometricAcousticContext::~GeometricAcousticContext ( )

Destroy a geometric acoustic context and release all internal resources.

Member Function Documentation

virtual void om::sound::acoustics::contexts::GeometricAcousticContext::update ( const AcousticRequest request,
const Time dt,
AcousticResult result = ((void *) 0) 
)
virtual

Update the state of all listeners in the acoustic context for the specified timestep.

The requested output acoustic data is placed in the result object if the pointer is not NULL.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::updateScene ( SoundSceneID  sceneID,
const AcousticRequest request,
const Time dt,
AcousticResult result = ((void *) 0) 
)
virtual

Update the state of all listeners in the given scene for the specified timestep.

The state of the specified scene is updated but no other scenes are changed. This method can be used to update scenes at different rates (e.g. for different priorities).

The requested output acoustic data is placed in the result object if the pointer is not NULL.

The method returns whether or not the specified scene was able to be updated.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::updateListener ( SoundListenerID  listenerID,
const AcousticRequest request,
const Time dt,
AcousticResult result = ((void *) 0) 
)
virtual

Update the state of a single listener in the acoustic context for the specified timestep.

The state of the specified listener is updated but no other listeners are changed. This method can be used to update listeners at different rates (e.g. for different priorities).

The requested output acoustic data is placed in the result object if the pointer is not NULL.

The method returns whether or not the specified listener was able to be updated.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual SoundResult om::sound::acoustics::contexts::GeometricAcousticContext::renderListener ( SoundListenerID  listenerID,
SoundBuffer buffer,
Size  numSamples 
)
virtual

Render a buffer of output sound for the specified listener.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Size om::sound::acoustics::contexts::GeometricAcousticContext::getListenerCount ( ) const
virtual

Return the number of listeners there are in this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual SoundListenerID om::sound::acoustics::contexts::GeometricAcousticContext::addListener ( SoundListener listener)
virtual

Add a new sound listener to this acoustic context and return the ID of the listener in the context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::removeListener ( SoundListenerID  listenerID)
virtual

Remove the listener with the specified ID from this acoustic context.

The method returns whether or not the listener was able to be removed.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual void om::sound::acoustics::contexts::GeometricAcousticContext::clearListeners ( )
virtual

Remove all listeners from this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Size om::sound::acoustics::contexts::GeometricAcousticContext::getSourceCount ( ) const
virtual

Return the number of sources there are in this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual SoundSourceID om::sound::acoustics::contexts::GeometricAcousticContext::addSource ( SoundSource source)
virtual

Add a new sound source to this acoustic context and return the ID of the source in the context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::removeSource ( SoundSourceID  sourceID)
virtual

Remove the source with the specified ID from this acoustic context.

The method returns whether or not the source was able to be removed.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual void om::sound::acoustics::contexts::GeometricAcousticContext::clearSources ( )
virtual

Remove all sources from this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Size om::sound::acoustics::contexts::GeometricAcousticContext::getObjectCount ( ) const
virtual

Return the number of objects there are in this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual SoundObjectID om::sound::acoustics::contexts::GeometricAcousticContext::addObject ( SoundObject object)
virtual

Add a new sound object to this acoustic context and return the ID of the object in the context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::removeObject ( SoundObjectID  objectID)
virtual

Remove the object with the specified ID from this acoustic context.

The method returns whether or not the object was able to be removed.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual void om::sound::acoustics::contexts::GeometricAcousticContext::clearObjects ( )
virtual

Remove all objects from this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Size om::sound::acoustics::contexts::GeometricAcousticContext::getSceneCount ( ) const
virtual

Return the number of scenes there are in this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual SoundSceneID om::sound::acoustics::contexts::GeometricAcousticContext::addScene ( )
virtual

Add a new sound scene to this acoustic context and return the ID of the scene in the context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::removeScene ( SoundSceneID  sceneID)
virtual

Remove the object with the specified ID from this acoustic context.

The method returns whether or not the object was able to be removed.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual void om::sound::acoustics::contexts::GeometricAcousticContext::clearScenes ( )
virtual

Remove all scenes from this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::addSceneObject ( SoundSceneID  scene,
SoundObjectID  object 
)
virtual

Add an existing object to the scene with the given ID.

An object can be part of more than one scene. The method returns whether or not the object was able to be added to the scene.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::removeSceneObject ( SoundSceneID  scene,
SoundObjectID  object 
)
virtual

Remove an existing object from the scene with the given ID.

The method returns whether or not the object was able to be removed from the scene.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::addSceneSource ( SoundSceneID  scene,
SoundSourceID  source 
)
virtual

Add an existing source to the scene with the given ID.

An source can be part of more than one scene. The method returns whether or not the source was able to be added to the scene.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::removeSceneSource ( SoundSceneID  scene,
SoundSourceID  source 
)
virtual

Remove an existing source from the scene with the given ID.

The method returns whether or not the source was able to be removed from the scene.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::addSceneListener ( SoundSceneID  scene,
SoundListenerID  listener 
)
virtual

Add an existing listener to the scene with the given ID.

An listener can be part of more than one scene. The method returns whether or not the listener was able to be added to the scene.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual Bool om::sound::acoustics::contexts::GeometricAcousticContext::removeSceneListener ( SoundSceneID  scene,
SoundListenerID  listener 
)
virtual

Remove an existing listener from the scene with the given ID.

The method returns whether or not the listener was able to be removed from the scene.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual const AcousticContextDelegate& om::sound::acoustics::contexts::GeometricAcousticContext::getDelegate ( ) const
virtual

Return a reference to the delegate for this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.

virtual void om::sound::acoustics::contexts::GeometricAcousticContext::setDelegate ( const AcousticContextDelegate newDelegate)
virtual

Set the delegate for this acoustic context.

Implements om::sound::acoustics::contexts::AcousticContext.


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