WeaponSound Class Reference

#include <WeaponSound.h>

Inheritance diagram for WeaponSound:

Weapon AccessoryPart

List of all members.

Public Member Functions

 WeaponSound ()
virtual ~WeaponSound ()
virtual bool parseXML (AccessoryCreateContext &context, XMLNode *accessoryNode)
const char * getSound ()
fixed getGain ()
fixed getRolloff ()
fixed getReferenceDistance ()
bool getRelative ()
void fireWeapon (ScorchedContext &context, WeaponFireContext &weaponContext, FixedVector &position, FixedVector &velocity)
 REGISTER_ACCESSORY_HEADER (WeaponSound, AccessoryPart::AccessoryWeapon)

Protected Attributes

std::vector
< std::string
sounds_
fixed gain_
fixed rolloff_
fixed referenceDistance_
bool relative_


Detailed Description

Definition at line 27 of file WeaponSound.h.


Constructor & Destructor Documentation

WeaponSound::WeaponSound (  ) 

Definition at line 29 of file WeaponSound.cpp.

WeaponSound::~WeaponSound (  )  [virtual]

Definition at line 36 of file WeaponSound.cpp.


Member Function Documentation

bool WeaponSound::parseXML ( AccessoryCreateContext context,
XMLNode accessoryNode 
) [virtual]

Reimplemented from Weapon.

Definition at line 47 of file WeaponSound.cpp.

References S3D::checkDataFile(), gain_, XMLNode::getNamedChild(), Weapon::parseXML(), referenceDistance_, relative_, rolloff_, and sounds_.

const char * WeaponSound::getSound (  ) 

Definition at line 41 of file WeaponSound.cpp.

References sounds_.

Referenced by SoundAction::simulate().

fixed WeaponSound::getGain (  )  [inline]

Definition at line 37 of file WeaponSound.h.

References gain_.

Referenced by SoundAction::simulate().

fixed WeaponSound::getRolloff (  )  [inline]

Definition at line 38 of file WeaponSound.h.

References rolloff_.

Referenced by SoundAction::simulate().

fixed WeaponSound::getReferenceDistance (  )  [inline]

Definition at line 39 of file WeaponSound.h.

References referenceDistance_.

Referenced by SoundAction::simulate().

bool WeaponSound::getRelative (  )  [inline]

Definition at line 40 of file WeaponSound.h.

References relative_.

Referenced by SoundAction::simulate().

void WeaponSound::fireWeapon ( ScorchedContext context,
WeaponFireContext weaponContext,
FixedVector position,
FixedVector velocity 
) [virtual]

Implements Weapon.

Definition at line 64 of file WeaponSound.cpp.

References ActionController::addAction(), and ScorchedContext::getActionController().

WeaponSound::REGISTER_ACCESSORY_HEADER ( WeaponSound  ,
AccessoryPart::AccessoryWeapon   
)


Member Data Documentation

std::vector<std::string> WeaponSound::sounds_ [protected]

Definition at line 48 of file WeaponSound.h.

Referenced by getSound(), and parseXML().

fixed WeaponSound::gain_ [protected]

Definition at line 49 of file WeaponSound.h.

Referenced by getGain(), and parseXML().

fixed WeaponSound::rolloff_ [protected]

Definition at line 50 of file WeaponSound.h.

Referenced by getRolloff(), and parseXML().

fixed WeaponSound::referenceDistance_ [protected]

Definition at line 51 of file WeaponSound.h.

Referenced by getReferenceDistance(), and parseXML().

bool WeaponSound::relative_ [protected]

Definition at line 52 of file WeaponSound.h.

Referenced by getRelative(), and parseXML().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:08 2009 for Scorched3D by  doxygen 1.5.3