Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a sound object in a virtual acoustic context. More...
#include <omSoundObject.h>
Public Member Functions | |
SoundObject () | |
Create a default sound object positioned at the origin with no shapes. More... | |
const Vector3f & | getPosition () const |
Return the position of this object. More... | |
void | setPosition (const Vector3f &newPosition) |
Set the position of this object. More... | |
const Matrix3f & | getOrientation () const |
Return the orientation of this object. More... | |
void | setOrientation (const Matrix3f &newOrientation) |
Set the orientation of this object. More... | |
const Vector3f & | getScale () const |
Return the scale of the object. More... | |
void | setScale (Float newScale) |
Set the scale of the object uniformly for all dimensions. More... | |
void | setScale (const Vector3f &newScale) |
Set the scale of the object. More... | |
const Transform3f & | getTransform () const |
Return the transformation for this object between its local and parent coordinate frame. More... | |
void | setTransform (const Transform3f &newTransform) |
Set the transformation for this object between its local and parent coordinate frame. More... | |
const Vector3f & | getVelocity () const |
Return the world-space linear velocity of this object in meters per second. More... | |
void | setVelocity (const Vector3f &newVelocity) |
Set the world-space linear velocity of this object in meters per second. More... | |
const Vector3f & | getAngularVelocity () const |
Return the world-space angular velocity of this object in radians per second. More... | |
void | setAngularVelocity (const Vector3f &newAngularVelocity) |
Set the world-space angular velocity of this object in radians per second. More... | |
Size | getShapeCount () const |
Return the number of shapes that this object has. More... | |
SoundShape * | getShape (Index shapeIndex) const |
Return a pointer to the shape for this object at the specified index. More... | |
Bool | addShape (SoundShape *newShape) |
Set the shape for this object at the specified index. More... | |
Bool | setShape (Index shapeIndex, SoundShape *newShape) |
Set the shape for this object at the specified index. More... | |
Bool | removeShape (Index shapeIndex) |
Remove the shape from this object at the specified index. More... | |
Bool | removeShape (const SoundShape *shape) |
Remove the specified shape from this object. More... | |
void | clearShapes () |
Remove all shapes from this object. More... | |
SoundObjectFlags & | getFlags () |
Return a reference to an object which contains boolean parameters of the sound object. More... | |
const SoundObjectFlags & | getFlags () const |
Return an object which contains boolean parameters of the sound object. More... | |
void | setFlags (const SoundObjectFlags &newFlags) |
Set an object which contains boolean parameters of the sound object. More... | |
Bool | flagIsSet (SoundObjectFlags::Flag flag) const |
Return whether or not the specified boolan flag is set for this sound object. More... | |
void | setFlag (SoundObjectFlags::Flag flag, Bool newIsSet=true) |
Set whether or not the specified boolan flag is set for this sound object. More... | |
Bool | getIsEnabled () const |
Return whether or not this object is enabled for sound propagation and rendering. More... | |
void | setIsEnabled (Bool newIsEnabled) |
Set whether or not this object should be enabled for sound propagation and rendering. More... | |
virtual Bool | setContext (AcousticContext *newContext) |
Set a pointer to the acoustics context this context object should use to do simulation. More... | |
SoundObjectID | getID () const |
Return the ID of this sound object 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::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 object. 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 object in a virtual acoustic context.
om::sound::acoustics::objects::SoundObject::SoundObject | ( | ) |
Create a default sound object positioned at the origin with no shapes.
|
inline |
Return the position of this object.
This position is specifid relative to the origin of the enclosing coordinate space.
|
inline |
Set the position of this object.
This position is specifid relative to the origin of the enclosing coordinate space.
|
inline |
Return the orientation of this object.
void om::sound::acoustics::objects::SoundObject::setOrientation | ( | const Matrix3f & | newOrientation | ) |
Set the orientation of this object.
|
inline |
Return the scale of the object.
|
inline |
Set the scale of the object uniformly for all dimensions.
|
inline |
Set the scale of the object.
|
inline |
Return the transformation for this object between its local and parent coordinate frame.
void om::sound::acoustics::objects::SoundObject::setTransform | ( | const Transform3f & | newTransform | ) |
Set the transformation for this object between its local and parent coordinate frame.
This method ensures that the object's new orientation matrix is orthonormal.
|
inline |
Return the world-space linear velocity of this object in meters per second.
|
inline |
Set the world-space linear velocity of this object in meters per second.
|
inline |
Return the world-space angular velocity of this object in radians per second.
|
inline |
Set the world-space angular velocity of this object in radians per second.
|
inline |
Return the number of shapes that this object has.
|
inline |
Return a pointer to the shape for this object at the specified index.
Bool om::sound::acoustics::objects::SoundObject::addShape | ( | SoundShape * | newShape | ) |
Set the shape for this object at the specified index.
The method returns whether or not the operation was successful. The method fails if the new shape pointer is NULL.
|
inline |
Set the shape for this object at the specified index.
The method returns whether or not the operation was successful. The method fails if the new shape pointer is NULL.
Remove the shape from this object at the specified index.
The method returns whether or not the operation was successful. The method fails if the specified index is out of bounds.
Bool om::sound::acoustics::objects::SoundObject::removeShape | ( | const SoundShape * | shape | ) |
Remove the specified shape from this object.
void om::sound::acoustics::objects::SoundObject::clearShapes | ( | ) |
Remove all shapes from this object.
|
inline |
Return a reference to an object which contains boolean parameters of the sound object.
|
inline |
Return an object which contains boolean parameters of the sound object.
|
inline |
Set an object which contains boolean parameters of the sound object.
|
inline |
Return whether or not the specified boolan flag is set for this sound object.
|
inline |
Set whether or not the specified boolan flag is set for this sound object.
|
inline |
Return whether or not this object is enabled for sound propagation and rendering.
Objects are enabled by default but can be disabled if no audio is being played for a object or if a object is not needed. This can increase the performance in scenes with large numbers of object that might not all be active at any given time.
|
inline |
Set whether or not this object should be enabled for sound propagation and rendering.
Objects are enabled by default but can be disabled if no audio is being played for a object or if a object is not needed. This can increase the performance in scenes with large numbers of object that might not all be active at any given time.
|
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 object 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 object.