![]() |
Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a sound source in a virtual acoustic context. More...
#include <omSoundSource.h>
Public Member Functions | |
| SoundSource () | |
| Create a default sound source positioned at the origin. More... | |
| SoundSource (const Vector3f &newPosition, Float newRadius) | |
| Create a sound source with the specified position and radius. More... | |
| Float | getPower () const |
| Return the total power of the sound source in watts. More... | |
| Float | getPowerLevel () const |
| Return the total power of the sound source in dB SWL (sound power level). More... | |
| void | setPower (Float newPower) |
| Set the total power of the sound source in watts. More... | |
| void | setPowerLevel (Float newPowerDB) |
| Set the total power of the sound source in dB SWL (sound power level). More... | |
| virtual Bool | setContext (AcousticContext *newContext) |
| Set a pointer to the acoustics context this context object should use to do simulation. More... | |
| SoundSourceID | getID () const |
| Return the ID of this sound source within its current acoustic context. More... | |
| virtual Bool | addSceneObjects (SoundSceneID sceneID) |
| Add internal context objects to the scene with the specified ID. More... | |
| virtual Bool | removeSceneObjects (SoundSceneID sceneID) |
| Remove internal context objects from the scene with the specified ID. More... | |
Public Member Functions inherited from om::sound::acoustics::objects::SoundTransducer | |
| SoundTransducer () | |
| Create a default sound transducer positioned at the origin. More... | |
| SoundTransducer (const Vector3f &newPosition, Float newRadius) | |
| Create a sound transducer with the specified position and radius. More... | |
| const Vector3f & | getPosition () const |
| Return the position of this transducer. More... | |
| void | setPosition (const Vector3f &newPosition) |
| Set the position of this transducer. More... | |
| const Matrix3f & | getOrientation () const |
| Return the orientation of this transducer. More... | |
| void | setOrientation (const Matrix3f &newOrientation) |
| Set the orientation of this transducer. More... | |
| const Vector3f & | getScale () const |
| Return the scale of the transducer. More... | |
| void | setScale (Float newScale) |
| Set the scale of the transducer uniformly for all dimensions. More... | |
| void | setScale (const Vector3f &newScale) |
| Set the scale of the transducer. More... | |
| const Transform3f & | getTransform () const |
| Return the transformation for this transducer between its local and parent coordinate frame. More... | |
| void | setTransform (const Transform3f &newTransform) |
| Set the transformation for this transducer between its local and parent coordinate frame. More... | |
| const Vector3f & | getVelocity () const |
| Return the world-space linear velocity of this tranducer in meters per second. More... | |
| void | setVelocity (const Vector3f &newVelocity) |
| Set the world-space linear velocity of this tranducer in meters per second. More... | |
| const Vector3f & | getAngularVelocity () const |
| Return the world-space angular velocity of this tranducer in radians per second. More... | |
| void | setAngularVelocity (const Vector3f &newAngularVelocity) |
| Set the world-space angular velocity of this tranducer in radians per second. More... | |
| Float | getRadius () const |
| Return the nominal radius of the transducer's spherical representation. More... | |
| void | setRadius (Float newRadius) |
| Set the nominal radius of the transducer's spherical representation. More... | |
| Size | getShapeCount () const |
| Return the number of shapes that this transducer has. More... | |
| SoundShape * | getShape (Index shapeIndex) const |
| Return a pointer to the shape for this transducer at the specified index. More... | |
| Bool | addShape (SoundShape *newShape) |
| Add a new shape to this transducer. More... | |
| Bool | setShape (Index shapeIndex, SoundShape *newShape) |
| Set the shape for this transducer at the specified index. More... | |
| Bool | removeShape (Index shapeIndex) |
| Remove the shape from this transducer at the specified index. More... | |
| Bool | removeShape (const SoundShape *shape) |
| Remove the specified shape from this transducer. More... | |
| void | clearShapes () |
| Remove all shapes from this transducer. More... | |
| Float | getPriority () const |
| Return a number indicating the priority for this sound transducer. More... | |
| void | setPriority (Float newPriority) |
| Set a number indicating the priority for this sound transducer. More... | |
| SampleRate | getSampleRate () const |
| Return the sample rate that should be used for this transducer. More... | |
| void | setSampleRate (SampleRate newSampleRate) |
| Set the sample rate that should be used for this transducer. More... | |
| DTF * | getDTF () const |
| Return a pointer to the optional directional transfer function for this sound source. More... | |
| void | setDTF (DTF *newDTF) |
| Set a pointer to the optional directional transfer function for this sound transducer. More... | |
| SoundTransducerFlags & | getFlags () |
| Return a reference to an object which contains boolean parameters of the sound transducer. More... | |
| const SoundTransducerFlags & | getFlags () const |
| Return an object which contains boolean parameters of the sound transducer. More... | |
| void | setFlags (const SoundTransducerFlags &newFlags) |
| Set an object which contains boolean parameters of the sound transducer. More... | |
| Bool | flagIsSet (SoundTransducerFlags::Flag flag) const |
| Return whether or not the specified boolan flag is set for this sound transducer. More... | |
| void | setFlag (SoundTransducerFlags::Flag flag, Bool newIsSet=true) |
| Set whether or not the specified boolan flag is set for this sound transducer. More... | |
| Bool | getIsEnabled () const |
| Return whether or not this source is enabled for sound propagation and rendering. More... | |
| void | setIsEnabled (Bool newIsEnabled) |
| Set whether or not this source should be enabled for sound propagation and rendering. 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 source. 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 source in a virtual acoustic context.
| om::sound::acoustics::objects::SoundSource::SoundSource | ( | ) |
Create a default sound source positioned at the origin.
| om::sound::acoustics::objects::SoundSource::SoundSource | ( | const Vector3f & | newPosition, |
| Float | newRadius | ||
| ) |
Create a sound source with the specified position and radius.
|
inline |
Return the total power of the sound source in watts.
This value is a linear measure of the total radiated power emitted by the sound source.
|
inline |
Return the total power of the sound source in dB SWL (sound power level).
This value is a unitless logarithmic measure of the total radiated power emitted by the sound source, compared to a reference value of 10e-12 watts.
|
inline |
Set the total power of the sound source in watts.
This value is a linear measure of the total radiated power emitted by the sound source. The input power is clamped to be larger than 0.
|
inline |
Set the total power of the sound source in dB SWL (sound power level).
This value is a unitless logarithmic measure of the total radiated power emitted by the sound source, compared to a reference value of 10e-12 watts.
|
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 source within its current acoustic context.
|
virtual |
Add internal context objects to the scene with the specified ID.
Reimplemented from om::sound::acoustics::objects::SoundSceneObject.
|
virtual |
Remove internal context objects from the scene with the specified ID.
Reimplemented from om::sound::acoustics::objects::SoundSceneObject.
|
static |
The resource type for a sound source.
1.8.11