Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::sound::acoustics::objects::SoundScene Class Reference

A class that represents a sound scene that contains sound sources, listeners, and objects. More...

#include <omSoundScene.h>

Inheritance diagram for om::sound::acoustics::objects::SoundScene:
om::sound::acoustics::contexts::AcousticContextObject

Public Member Functions

 SoundScene ()
 Create a new default empty sound scene. More...
 
 ~SoundScene ()
 Destroy a sound scene and release all internal resources. More...
 
Size getSourceCount () const
 Return the number of sources there are in this sound scene. More...
 
SoundSourcegetSource (Index sourceIndex) const
 Return a pointer to the source at the specified index in this sound scene. More...
 
void setSource (Index sourceIndex, SoundSource *source)
 Set the source at the specified index in this sound scene. More...
 
Bool addSource (SoundSource *newSource)
 Add a new source to this sound scene. More...
 
Bool removeSource (SoundSource *source)
 Remove the specified source from this sound scene. More...
 
void clearSources ()
 Remove all sources from this sound scene. More...
 
Size getListenerCount () const
 Return the number of listeners there are in this sound scene. More...
 
SoundListenergetListener (Index listenerIndex) const
 Return a pointer to the listener at the specified index in this sound scene. More...
 
void setListener (Index listenerIndex, SoundListener *newListener)
 Set the listener at the specified index in this sound scene. More...
 
Bool addListener (SoundListener *newListener)
 Add a new listener to this sound scene. More...
 
Bool removeListener (SoundListener *listener)
 Remove the specified listener from this sound scene. More...
 
void clearListeners ()
 Remove all listeners from this sound scene. More...
 
Size getObjectCount () const
 Return the number of objects there are in this sound scene. More...
 
SoundObjectgetObject (Index objectIndex) const
 Return a pointer to the object at the specified index in this sound scene. More...
 
void setObject (Index objectIndex, SoundObject *newObject)
 Set the object at the specified index in this sound scene. More...
 
Bool addObject (SoundObject *newObject)
 Add a new object to this sound scene. More...
 
Bool removeObject (SoundObject *object)
 Remove the specified object from this sound scene. More...
 
void clearObjects ()
 Remove all objects from this sound scene. More...
 
virtual Bool setContext (AcousticContext *newContext)
 Set a pointer to the acoustics context this context object should use to do simulation. More...
 
SoundSceneID getID () const
 Return the ID of this sound scene within its current acoustic context. More...
 
- Public Member Functions inherited from om::sound::acoustics::contexts::AcousticContextObject
virtual ~AcousticContextObject ()
 Destory this acoustics context object. More...
 
AcousticContextgetContext () const
 Return a pointer to the acoustics context this context object is using to do simulation. More...
 
Bool clearContext ()
 Clear the previous context from this object. More...
 

Static Public Attributes

static const ResourceType RESOURCE_TYPE
 The resource type for a sound scene. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::sound::acoustics::contexts::AcousticContextObject
 AcousticContextObject ()
 Create a new acoustics context object that doesn't have an associated acoustics context. More...
 
 AcousticContextObject (AcousticContext *newContext)
 Create a new acoustics context object that uses the specified context for simulation. More...
 
- Protected Attributes inherited from om::sound::acoustics::contexts::AcousticContextObject
AcousticContextcontext
 A pointer to the acoustics context this object is using. More...
 

Detailed Description

A class that represents a sound scene that contains sound sources, listeners, and objects.

Constructor & Destructor Documentation

om::sound::acoustics::objects::SoundScene::SoundScene ( )

Create a new default empty sound scene.

om::sound::acoustics::objects::SoundScene::~SoundScene ( )

Destroy a sound scene and release all internal resources.

Member Function Documentation

Size om::sound::acoustics::objects::SoundScene::getSourceCount ( ) const
inline

Return the number of sources there are in this sound scene.

SoundSource* om::sound::acoustics::objects::SoundScene::getSource ( Index  sourceIndex) const
inline

Return a pointer to the source at the specified index in this sound scene.

void om::sound::acoustics::objects::SoundScene::setSource ( Index  sourceIndex,
SoundSource source 
)
inline

Set the source at the specified index in this sound scene.

Bool om::sound::acoustics::objects::SoundScene::addSource ( SoundSource newSource)

Add a new source to this sound scene.

If the new source is NULL, the method has no effect.

Bool om::sound::acoustics::objects::SoundScene::removeSource ( SoundSource source)

Remove the specified source from this sound scene.

This method performs a linear search for the specified source in the scene and removes it if it is found. A value of TRUE is returned if the source was found and removed. Otherwise, FALSE is returned.

void om::sound::acoustics::objects::SoundScene::clearSources ( )

Remove all sources from this sound scene.

Size om::sound::acoustics::objects::SoundScene::getListenerCount ( ) const
inline

Return the number of listeners there are in this sound scene.

SoundListener* om::sound::acoustics::objects::SoundScene::getListener ( Index  listenerIndex) const
inline

Return a pointer to the listener at the specified index in this sound scene.

void om::sound::acoustics::objects::SoundScene::setListener ( Index  listenerIndex,
SoundListener newListener 
)
inline

Set the listener at the specified index in this sound scene.

Bool om::sound::acoustics::objects::SoundScene::addListener ( SoundListener newListener)

Add a new listener to this sound scene.

If the new listener is NULL, the method has no effect.

Bool om::sound::acoustics::objects::SoundScene::removeListener ( SoundListener listener)

Remove the specified listener from this sound scene.

This method performs a linear search for the specified listener in the scene and removes it if it is found. A value of TRUE is returned if the listener was found and removed. Otherwise, FALSE is returned.

void om::sound::acoustics::objects::SoundScene::clearListeners ( )

Remove all listeners from this sound scene.

Size om::sound::acoustics::objects::SoundScene::getObjectCount ( ) const
inline

Return the number of objects there are in this sound scene.

SoundObject* om::sound::acoustics::objects::SoundScene::getObject ( Index  objectIndex) const
inline

Return a pointer to the object at the specified index in this sound scene.

void om::sound::acoustics::objects::SoundScene::setObject ( Index  objectIndex,
SoundObject newObject 
)
inline

Set the object at the specified index in this sound scene.

Bool om::sound::acoustics::objects::SoundScene::addObject ( SoundObject newObject)

Add a new object to this sound scene.

If the new object is NULL, the method has no effect.

Bool om::sound::acoustics::objects::SoundScene::removeObject ( SoundObject object)

Remove the specified object from this sound scene.

This method performs a linear search for the specified object in the scene and removes it if it is found. A value of TRUE is returned if the object was found and removed. Otherwise, FALSE is returned.

void om::sound::acoustics::objects::SoundScene::clearObjects ( )

Remove all objects from this sound scene.

virtual Bool om::sound::acoustics::objects::SoundScene::setContext ( AcousticContext newContext)
virtual

Set a pointer to the acoustics context this context object should use to do simulation.

Reimplemented from om::sound::acoustics::contexts::AcousticContextObject.

SoundSceneID om::sound::acoustics::objects::SoundScene::getID ( ) const
inline

Return the ID of this sound scene within its current acoustic context.

Member Data Documentation

const ResourceType om::sound::acoustics::objects::SoundScene::RESOURCE_TYPE
static

The resource type for a sound scene.


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