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

A class that represents a sound object in a virtual acoustic context. More...

#include <omSoundObject.h>

Inheritance diagram for om::sound::acoustics::objects::SoundObject:
om::sound::acoustics::objects::SoundSceneObject om::sound::acoustics::contexts::AcousticContextObject

Public Member Functions

 SoundObject ()
 Create a default sound object positioned at the origin with no shapes. More...
 
const Vector3fgetPosition () const
 Return the position of this object. More...
 
void setPosition (const Vector3f &newPosition)
 Set the position of this object. More...
 
const Matrix3fgetOrientation () const
 Return the orientation of this object. More...
 
void setOrientation (const Matrix3f &newOrientation)
 Set the orientation of this object. More...
 
const Vector3fgetScale () 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 Transform3fgetTransform () 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 Vector3fgetVelocity () 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 Vector3fgetAngularVelocity () 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...
 
SoundShapegetShape (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...
 
SoundObjectFlagsgetFlags ()
 Return a reference to an object which contains boolean parameters of the sound object. More...
 
const SoundObjectFlagsgetFlags () 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...
 
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 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
AcousticContextcontext
 A pointer to the acoustics context this object is using. More...
 

Detailed Description

A class that represents a sound object in a virtual acoustic context.

Constructor & Destructor Documentation

om::sound::acoustics::objects::SoundObject::SoundObject ( )

Create a default sound object positioned at the origin with no shapes.

Member Function Documentation

const Vector3f& om::sound::acoustics::objects::SoundObject::getPosition ( ) const
inline

Return the position of this object.

This position is specifid relative to the origin of the enclosing coordinate space.

void om::sound::acoustics::objects::SoundObject::setPosition ( const Vector3f newPosition)
inline

Set the position of this object.

This position is specifid relative to the origin of the enclosing coordinate space.

const Matrix3f& om::sound::acoustics::objects::SoundObject::getOrientation ( ) const
inline

Return the orientation of this object.

void om::sound::acoustics::objects::SoundObject::setOrientation ( const Matrix3f newOrientation)

Set the orientation of this object.

const Vector3f& om::sound::acoustics::objects::SoundObject::getScale ( ) const
inline

Return the scale of the object.

void om::sound::acoustics::objects::SoundObject::setScale ( Float  newScale)
inline

Set the scale of the object uniformly for all dimensions.

void om::sound::acoustics::objects::SoundObject::setScale ( const Vector3f newScale)
inline

Set the scale of the object.

const Transform3f& om::sound::acoustics::objects::SoundObject::getTransform ( ) const
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.

const Vector3f& om::sound::acoustics::objects::SoundObject::getVelocity ( ) const
inline

Return the world-space linear velocity of this object in meters per second.

void om::sound::acoustics::objects::SoundObject::setVelocity ( const Vector3f newVelocity)
inline

Set the world-space linear velocity of this object in meters per second.

const Vector3f& om::sound::acoustics::objects::SoundObject::getAngularVelocity ( ) const
inline

Return the world-space angular velocity of this object in radians per second.

void om::sound::acoustics::objects::SoundObject::setAngularVelocity ( const Vector3f newAngularVelocity)
inline

Set the world-space angular velocity of this object in radians per second.

Size om::sound::acoustics::objects::SoundObject::getShapeCount ( ) const
inline

Return the number of shapes that this object has.

SoundShape* om::sound::acoustics::objects::SoundObject::getShape ( Index  shapeIndex) const
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.

Bool om::sound::acoustics::objects::SoundObject::setShape ( Index  shapeIndex,
SoundShape newShape 
)
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.

Bool om::sound::acoustics::objects::SoundObject::removeShape ( Index  shapeIndex)

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.

Returns
whether or not the shape was successfully found and removed.
void om::sound::acoustics::objects::SoundObject::clearShapes ( )

Remove all shapes from this object.

SoundObjectFlags& om::sound::acoustics::objects::SoundObject::getFlags ( )
inline

Return a reference to an object which contains boolean parameters of the sound object.

const SoundObjectFlags& om::sound::acoustics::objects::SoundObject::getFlags ( ) const
inline

Return an object which contains boolean parameters of the sound object.

void om::sound::acoustics::objects::SoundObject::setFlags ( const SoundObjectFlags newFlags)
inline

Set an object which contains boolean parameters of the sound object.

Bool om::sound::acoustics::objects::SoundObject::flagIsSet ( SoundObjectFlags::Flag  flag) const
inline

Return whether or not the specified boolan flag is set for this sound object.

void om::sound::acoustics::objects::SoundObject::setFlag ( SoundObjectFlags::Flag  flag,
Bool  newIsSet = true 
)
inline

Set whether or not the specified boolan flag is set for this sound object.

Bool om::sound::acoustics::objects::SoundObject::getIsEnabled ( ) const
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.

void om::sound::acoustics::objects::SoundObject::setIsEnabled ( Bool  newIsEnabled)
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 Bool om::sound::acoustics::objects::SoundObject::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.

SoundObjectID om::sound::acoustics::objects::SoundObject::getID ( ) const
inline

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

virtual Bool om::sound::acoustics::objects::SoundObject::addSceneObjects ( SoundSceneID  sceneID)
virtual

Add internal context objects to the scene with the specified ID.

Reimplemented from om::sound::acoustics::objects::SoundSceneObject.

virtual Bool om::sound::acoustics::objects::SoundObject::removeSceneObjects ( SoundSceneID  sceneID)
virtual

Remove internal context objects from the scene with the specified ID.

Reimplemented from om::sound::acoustics::objects::SoundSceneObject.

Member Data Documentation

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

The resource type for a sound object.


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