SFXDescription Class Reference

#include <sfxDescription.h>

Inheritance diagram for SFXDescription:

Inheritance graph
[legend]
List of all members.

Detailed Description

The SFXDescription defines how a sound should be played.

If mConeInsideAngle and mConeOutsideAngle are not both 360 then the sound will be directional and facing out the Y axis.

A few tips:

Make sure that server SFXDescription are defined with the datablock keyword, and that client SFXDescription are defined with the 'new' keyword.


Public Member Functions

 SFXDescription ()
 SFXDescription (const SFXDescription &desc)
 DECLARE_CONOBJECT (SFXDescription)
virtual bool onAdd ()
 Called when the object is added to the sim.
virtual void packData (BitStream *stream)
virtual void unpackData (BitStream *stream)
void validate ()
 Validates the description fixing any parameters that are out of range.

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Public Attributes

F32 mVolume
 The 0 to 1 volume scale.
bool mIsLooping
 If true the sound will loop.
bool mIsStreaming
 If true the sound data will be streamed from disk and not loaded completely into memory.
bool mIs3D
 If true the sound will be 3D positional.
F32 mReferenceDistance
 The distance from the emitter at which the sound volume is unchanged.
F32 mMaxDistance
 The distance from the emitter at which the sound volume becomes zero.
U32 mConeInsideAngle
 The angle in degrees of the inner part of the cone.
U32 mConeOutsideAngle
 The angle in degrees of the outer part of the cone.
F32 mConeOutsideVolume
 The volume scalar for on/beyond the outside angle.
U32 mChannel
 The sound channel for this sound.

Private Types

typedef SimDataBlock Parent


Member Typedef Documentation

Reimplemented from SimDataBlock.


Constructor & Destructor Documentation

SFXDescription::SFXDescription (  ) 

SFXDescription::SFXDescription ( const SFXDescription desc  ) 


Member Function Documentation

SFXDescription::DECLARE_CONOBJECT ( SFXDescription   ) 

static void SFXDescription::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDeprecatedField(), addGroup(), endGroup()

Reimplemented from SimObject.

virtual bool SFXDescription::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from SimDataBlock.

virtual void SFXDescription::packData ( BitStream stream  )  [virtual]

Reimplemented from SimDataBlock.

virtual void SFXDescription::unpackData ( BitStream stream  )  [virtual]

Reimplemented from SimDataBlock.

void SFXDescription::validate (  ) 

Validates the description fixing any parameters that are out of range.


Member Data Documentation

The 0 to 1 volume scale.

If true the sound will loop.

If true the sound data will be streamed from disk and not loaded completely into memory.

NOTE: This is currently non-functional and all sounds are loaded fully into memory.

If true the sound will be 3D positional.

The distance from the emitter at which the sound volume is unchanged.

Beyond this distance the volume begins to falloff.

This is only valid for 3D sounds.

The distance from the emitter at which the sound volume becomes zero.

This is only valid for 3D sounds.

The angle in degrees of the inner part of the cone.

It must be within 0 to 360.

This is only valid for 3D sounds.

The angle in degrees of the outer part of the cone.

It must be greater than mConeInsideAngle and less than to 360.

This is only valid for 3D sounds.

The volume scalar for on/beyond the outside angle.

This is only valid for 3D sounds.