Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.SoundLevelMeter Class Reference

Sound level meter Resource. More...

Inheritance diagram for Dragengine.Scenery.SoundLevelMeter:

Public Member Functions

Constructors
SoundLevelMeter new ()
 Create sound level meter. More...
 
Management
SoundLevelMeterType getType ()
 Type. More...
 
void setType (SoundLevelMeterType type)
 Set type. More...
 
DVector getPosition ()
 Position. More...
 
void setPosition (DVector position)
 Set position. More...
 
Quaternion getOrientation ()
 Orientation. More...
 
void setOrientation (Quaternion orientation)
 Set orientation. More...
 
float getConeAngle ()
 Cone angle in radians measured from cone center to outer hull. More...
 
void setConeAngle (float angle)
 Set cone angle in radians measured from cone center to outer hull. More...
 
float getAudibleDistance ()
 Audible distance in meters. More...
 
void setAudibleDistance (float audibleDistance)
 Set audible distance in meters. More...
 
LayerMask getLayerMask ()
 Layer mask. More...
 
void setLayerMask (LayerMask layerMask)
 Set layer mask. More...
 
bool getEnabled ()
 Measuring is enabled. More...
 
void setEnabled (bool enabled)
 Set if measuring is enabled. More...
 
int getAudibleSpeakerCount ()
 Number of audible speakers. More...
 
SoundLevelMeterSpeaker getAudibleSpeakerAt (int index)
 Audible speaker at index. More...
 
SoundLevelMeterListener getListener ()
 Sound level meter listener or null if not set. More...
 
void setListener (SoundLevelMeterListener listener)
 Set sound level meter listener or null if not set. More...
 

Detailed Description

Sound level meter Resource.

Sound level meters are sensors to measure the sound level present in a specific spot in the game world. The meter also stores a list of all speakers contributing to the sound level. Sound level meters allow adding sound sensing capabilities to game entities.

To use a sound level meter place the resource in the game world and set the desired audible range and directivity. The audio module updates the metering results as soon as possible. This can happen the next frame or a couple of frames later depending on how the audio module operates internally.

Sound level meters are only affected by speakers and components matching the layer mask set in the meter. Furthermore meters can be enabled and disabled to stop measuring while not in use without needing to remove and add the meter from the game all the time.

This is a native class.

Member Function Documentation

◆ getAudibleDistance()

float Dragengine.Scenery.SoundLevelMeter.getAudibleDistance ( )

Audible distance in meters.

◆ getAudibleSpeakerAt()

SoundLevelMeterSpeaker Dragengine.Scenery.SoundLevelMeter.getAudibleSpeakerAt ( int  index)

Audible speaker at index.

◆ getAudibleSpeakerCount()

int Dragengine.Scenery.SoundLevelMeter.getAudibleSpeakerCount ( )

Number of audible speakers.

◆ getConeAngle()

float Dragengine.Scenery.SoundLevelMeter.getConeAngle ( )

Cone angle in radians measured from cone center to outer hull.

◆ getEnabled()

bool Dragengine.Scenery.SoundLevelMeter.getEnabled ( )

Measuring is enabled.

◆ getLayerMask()

LayerMask Dragengine.Scenery.SoundLevelMeter.getLayerMask ( )

Layer mask.

◆ getListener()

SoundLevelMeterListener Dragengine.Scenery.SoundLevelMeter.getListener ( )

Sound level meter listener or null if not set.

◆ getOrientation()

Quaternion Dragengine.Scenery.SoundLevelMeter.getOrientation ( )

Orientation.

◆ getPosition()

DVector Dragengine.Scenery.SoundLevelMeter.getPosition ( )

Position.

◆ getType()

SoundLevelMeterType Dragengine.Scenery.SoundLevelMeter.getType ( )

Type.

◆ new()

SoundLevelMeter Dragengine.Scenery.SoundLevelMeter.new ( )

Create sound level meter.

◆ setAudibleDistance()

void Dragengine.Scenery.SoundLevelMeter.setAudibleDistance ( float  audibleDistance)

Set audible distance in meters.

◆ setConeAngle()

void Dragengine.Scenery.SoundLevelMeter.setConeAngle ( float  angle)

Set cone angle in radians measured from cone center to outer hull.

◆ setEnabled()

void Dragengine.Scenery.SoundLevelMeter.setEnabled ( bool  enabled)

Set if measuring is enabled.

◆ setLayerMask()

void Dragengine.Scenery.SoundLevelMeter.setLayerMask ( LayerMask  layerMask)

Set layer mask.

◆ setListener()

void Dragengine.Scenery.SoundLevelMeter.setListener ( SoundLevelMeterListener  listener)

Set sound level meter listener or null if not set.

◆ setOrientation()

void Dragengine.Scenery.SoundLevelMeter.setOrientation ( Quaternion  orientation)

Set orientation.

◆ setPosition()

void Dragengine.Scenery.SoundLevelMeter.setPosition ( DVector  position)

Set position.

◆ setType()

void Dragengine.Scenery.SoundLevelMeter.setType ( SoundLevelMeterType  type)

Set type.


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