![]() |
Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a sound scene that contains sound sources, listeners, and objects. More...
#include <omSoundScene.h>
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... | |
| SoundSource * | getSource (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... | |
| SoundListener * | getListener (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... | |
| SoundObject * | getObject (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... | |
| AcousticContext * | getContext () 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 | |
| AcousticContext * | context |
| A pointer to the acoustics context this object is using. More... | |
A class that represents a sound scene that contains sound sources, listeners, and objects.
| 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.
|
inline |
Return the number of sources there are in this sound scene.
|
inline |
Return a pointer to the source at the specified index in this sound scene.
|
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.
|
inline |
Return the number of listeners there are in this sound scene.
|
inline |
Return a pointer to the listener at the specified index in this sound scene.
|
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.
|
inline |
Return the number of objects there are in this sound scene.
|
inline |
Return a pointer to the object at the specified index in this sound scene.
|
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 |
Set a pointer to the acoustics context this context object should use to do simulation.
Reimplemented from om::sound::acoustics::contexts::AcousticContextObject.
|
inline |
Return the ID of this sound scene within its current acoustic context.
|
static |
The resource type for a sound scene.
1.8.11