SFXParameter

Engine/source/sfx/sfxParameter.h

Parameter for interactive audio.

More...

Callbacks

DECLARE_CALLBACK(void , onUpdate , () )

Public Types

Signal< void(SFXParameter *parameter, SFXParameterEvent event) >
EventSignal 
Parent 

Protected Attributes

The channel being controlled by this parameter.

Value assigned to the parameter on creation and reset.

Help text.

The signal used to notify attached sources of parameter events.

The min/max range of the parameter's value. Both inclusive.

The current value.

Protected Static Functions

bool
_setChannel(void * object, const char * index, const char * data)
bool
_setDefaultValue(void * object, const char * index, const char * data)
bool
_setRange(void * object, const char * index, const char * data)
bool
_setValue(void * object, const char * index, const char * data)

Public Functions

Return the parameter channel that is being affected by this parameter.

Return the default value of this parameter.

Return the description text supplied for this parameter.

Return the event signal for this parameter.

Return the range of valid values that this parameter may take.

Return the current value of this parameter.

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

Reset the parameter's value to its default.

Set the parameter channel that is being affected by this parameter.

Set the default value of this parameter.

Set the description text for this parameter.

Set the valid range for the value of this parameter.

setRange(F32 minValue, F32 maxValue)

Set the valid range for the value of this parameter.

setValue(F32 value)

Set the parameter's current value.

Update the parameter's value.

Public Static Functions

Look up a parameter by the given name.

Detailed Description

Parameter for interactive audio.

Parameters are tied to sound sources and will signal value changes so that sound sources may react.

All parameters are global. The name of a parameter is its internal object name.

Like sources, parameters are exclusively client-side.

Callbacks

DECLARE_CALLBACK(void , onUpdate , () )

Public Types

typedef Signal< void(SFXParameter *parameter, SFXParameterEvent event) > EventSignal 
typedef SimObject Parent 

Protected Attributes

SFXChannel mChannel 

The channel being controlled by this parameter.

F32 mDefaultValue 

Value assigned to the parameter on creation and reset.

String mDescription 

Help text.

EventSignal mEventSignal 

The signal used to notify attached sources of parameter events.

Point2F mRange 

The min/max range of the parameter's value. Both inclusive.

F32 mValue 

The current value.

Protected Static Functions

_setChannel(void * object, const char * index, const char * data)

_setDefaultValue(void * object, const char * index, const char * data)

_setRange(void * object, const char * index, const char * data)

_setValue(void * object, const char * index, const char * data)

Public Functions

SFXParameter()

~SFXParameter()

DECLARE_CATEGORY("SFX" )

DECLARE_CONOBJECT(SFXParameter )

DECLARE_DESCRIPTION("" )

getChannel()

Return the parameter channel that is being affected by this parameter.

getDefaultValue()

Return the default value of this parameter.

This is the value the parameter will be set to when it is added to the system.

getDescription()

Return the description text supplied for this parameter.

This is used to help identify the purpose of a parameter.

getEventSignal()

Return the event signal for this parameter.

getRange()

Return the range of valid values that this parameter may take.

getValue()

Return the current value of this parameter.

onAdd()

Reimplemented from: SimObject

onRemove()

Reimplemented from: SimObject

reset()

Reset the parameter's value to its default.

setChannel(SFXChannel channel)

Set the parameter channel that is being affected by this parameter.

setDefaultValue(F32 value)

Set the default value of this parameter.

This is the value the parameter is set to when it is added to the system.

setDescription(const String & str)

Set the description text for this parameter.

This may be used to help identify the purpose of a parameter.

setRange(const Point2F & range)

Set the valid range for the value of this parameter.

Note that both min and max are inclusive.

setRange(F32 minValue, F32 maxValue)

Set the valid range for the value of this parameter.

Note that both min and max are inclusive.

setValue(F32 value)

Set the parameter's current value.

Will be clamped against the parameter's valid value range. If a value change occurs, a SFXParameterEvent_ValueChange event is fired.

update()

Update the parameter's value.

The default implementation will invoke a script 'onUpdate' method if it is defined and do nothing otherwise.

Public Static Functions

find(StringTableEntry name)

Look up a parameter by the given name.

initPersistFields()