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

A class that encapsulates the different boolean flags that a sound transducer can have. More...

#include <omSoundTransducerFlags.h>

Public Types

enum  Flag {
  ENABLED = (1 << 0), DIRECTIVITY = (1 << 1), SAMPLE_RATE = (1 << 2), SHAPES = (1 << 3),
  DEFAULT = ENABLED | DIRECTIVITY, UNDEFINED = 0
}
 An enum that specifies the different sound transducer flags. More...
 

Public Member Functions

 SoundTransducerFlags ()
 Create a new sound transducer flags object with no flags set. More...
 
 SoundTransducerFlags (Flag flag)
 Create a new sound transducer flags object with the specified flag value initially set. More...
 
 SoundTransducerFlags (UInt32 newFlags)
 Create a new sound transducer flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this acoustic flags object to an integer value. More...
 
Bool isSet (Flag flag) const
 Return whether or not the specified flag value is set for this flags object. More...
 
void set (Flag flag, Bool newIsSet)
 Set whether or not the specified flag value is set for this flags object. More...
 

Detailed Description

A class that encapsulates the different boolean flags that a sound transducer can have.

These flags provide boolean information about a sound transducer. Flags are indicated by setting a single bit of a 32-bit unsigned integer to 1.

Enum values for the different flags are defined as members of the class. Typically, the user would bitwise-OR the flag enum values together to produce a final set of set flags.

Member Enumeration Documentation

An enum that specifies the different sound transducer flags.

Enumerator
ENABLED 

A flag indicating whether or not simulation of this transducer is enabled.

DIRECTIVITY 

A flag indicating whether or not the source is directional.

If this flag is set and the source has directivity information, directional sound propagation is done for the sound transducer.

SAMPLE_RATE 

A flag indicating whether or not the transducer's individual sample rate should be used.

If this flag is set, the propagation and rendering is performed at the transducer's sample rate rather than the global sample rate. This can be used to save computation and memory on sources with less high-frequency content by reducing the sample rate.

SHAPES 

A flag indicating whether or not the transducer's shapes should be used as its simulation representation.

If the flag is not set, a spherical representation is used instead. Using a shape representation may be more expensive to simulate.

DEFAULT 

The default flags to use for a sound transducer.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::sound::acoustics::objects::SoundTransducerFlags::SoundTransducerFlags ( )
inline

Create a new sound transducer flags object with no flags set.

om::sound::acoustics::objects::SoundTransducerFlags::SoundTransducerFlags ( Flag  flag)
inline

Create a new sound transducer flags object with the specified flag value initially set.

om::sound::acoustics::objects::SoundTransducerFlags::SoundTransducerFlags ( UInt32  newFlags)
inline

Create a new sound transducer flags object with the specified initial combined flags value.

Member Function Documentation

om::sound::acoustics::objects::SoundTransducerFlags::operator UInt32 ( ) const
inline

Convert this acoustic flags object to an integer value.

This operator is provided so that the SoundTransducerFlags object can be used as an integer value for bitwise logical operations.

Bool om::sound::acoustics::objects::SoundTransducerFlags::isSet ( Flag  flag) const
inline

Return whether or not the specified flag value is set for this flags object.

void om::sound::acoustics::objects::SoundTransducerFlags::set ( Flag  flag,
Bool  newIsSet 
)
inline

Set whether or not the specified flag value is set for this flags object.


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