Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <Sound.h>
Public Member Functions | |
const core::vector3d | getDirection () const |
f32 | getGain () const |
Returns the gain. | |
f32 | getInnerConeAngle () const |
Return the innerConeAngle. | |
f32 | getMaxDistance () const |
Returns the max distance. | |
f32 | getMinDistance () const |
Returns the min distance. | |
f32 | getOuterConeAngle () const |
Returns the outerConeAngle. | |
f32 | getOuterConeGain () const |
Returns the outerConeGain. | |
f32 | getPitch () const |
Returns the pitch multiplier. | |
SoundData * | getSoundData () const |
const core::vector3d & | getVelocity () const |
bool | isLooping () const |
Returns looping state. | |
virtual bool | isPaused () const |
Returns true if the sound is paused. | |
virtual bool | isPlaying () const |
Returns true if the sound is playing. | |
virtual bool | isStopped () const |
Returns true if the sound is stopped. | |
virtual void | pause () |
Pauses the sound. Upon calling play again, the sound will resume where it left off. | |
virtual void | play () |
Plays the sound. | |
void | resourceLoaded (const resource::ResourceEvent &evt) |
Called just after a Resource has been loaded. | |
void | resourceUnloaded (const resource::ResourceEvent &evt) |
Called just after a Resource has been unloaded. | |
void | setConeSettings (f32 innerConeAngle, f32 outerConeAngle, f32 outerConeGain) |
void | setDistanceValues (f32 minDistance, f32 maxDistance) |
virtual void | setGain (f32 gain) |
Sets the gain. | |
virtual void | setInnerConeAngle (f32 innerConeAngle) |
Sets the inner angle of the sound cone for a directional sound. | |
virtual void | setLoop (bool loop) |
Sets the looping state. | |
virtual void | setMaxDistance (f32 maxDistance) |
Sets the Max Distance. | |
virtual void | setMinDistance (f32 minDistance) |
Sets the Min Distance. | |
virtual void | setOuterConeAngle (f32 outerConeAngle) |
Sets the outer angle of the sound cone for a directional sound. | |
virtual void | setOuterConeGain (f32 outerConeGain) |
Sets the gain outside the sound cone of a directional sound. | |
virtual void | setPitch (f32 pitch) |
Sets the pitch multiplier. | |
void | setSoundData (const std::string &filename) |
Sets the sound data this sound will use. | |
void | setSoundData (SoundData *soundData) |
void | setVelocity (const core::vector3d &vec) |
void | setVelocity (f32 x, f32 y, f32 z) |
Sound (const std::string &name, SoundData *soundData) | |
Sound (SoundData *soundData) | |
virtual void | stop () |
Stops the sound. Upon calling play again, the sound will resume from the begining. | |
virtual | ~Sound () |
Protected Member Functions | |
void | initProperties () |
Protected Attributes | |
f32 | mGain |
f32 | mInnerConeAngle |
bool | mLoop |
f32 | mMaxDistance |
f32 | mMinDistance |
f32 | mOuterConeAngle |
f32 | mOuterConeGain |
f32 | mPitch |
SoundData * | mSoundData |
core::vector3d | mVelocity |
Static Protected Attributes | |
static u32 | msNextGeneratedSoundIndex = 0 |
Defines a sound in the sound world. Author: Kat'Oun version: 1.0
sound::Sound::Sound | ( | SoundData * | soundData | ) |
sound::Sound::Sound | ( | const std::string & | name, |
SoundData * | soundData | ||
) |
sound::Sound::~Sound | ( | ) | [virtual] |
const core::vector3d sound::Sound::getDirection | ( | ) | const |
f32 sound::Sound::getInnerConeAngle | ( | ) | const |
Return the innerConeAngle.
References mInnerConeAngle.
f32 sound::Sound::getMaxDistance | ( | ) | const |
Returns the max distance.
References mMaxDistance.
f32 sound::Sound::getMinDistance | ( | ) | const |
Returns the min distance.
References mMinDistance.
f32 sound::Sound::getOuterConeAngle | ( | ) | const |
Returns the outerConeAngle.
References mOuterConeAngle.
f32 sound::Sound::getOuterConeGain | ( | ) | const |
Returns the outerConeGain.
References mOuterConeGain.
SoundData * sound::Sound::getSoundData | ( | ) | const |
References mSoundData.
const core::vector3d & sound::Sound::getVelocity | ( | ) | const |
References mVelocity.
void sound::Sound::initProperties | ( | ) | [protected] |
Reimplemented from scene::Node.
References mLoop, mVelocity, and core::vector3d::ORIGIN_3D.
Referenced by Sound().
bool sound::Sound::isLooping | ( | ) | const |
Returns looping state.
References mLoop.
bool sound::Sound::isPaused | ( | ) | const [virtual] |
Returns true if the sound is paused.
bool sound::Sound::isPlaying | ( | ) | const [virtual] |
Returns true if the sound is playing.
bool sound::Sound::isStopped | ( | ) | const [virtual] |
Returns true if the sound is stopped.
void sound::Sound::pause | ( | ) | [virtual] |
Pauses the sound. Upon calling play again, the sound will resume where it left off.
void sound::Sound::play | ( | ) | [virtual] |
Plays the sound.
void sound::Sound::resourceLoaded | ( | const resource::ResourceEvent & | evt | ) | [virtual] |
Called just after a Resource has been loaded.
Reimplemented from resource::ResourceEventReceiver.
References sound::SoundData::getGain(), sound::SoundData::getInnerConeAngle(), sound::SoundData::getMaxDistance(), sound::SoundData::getMinDistance(), sound::SoundData::getOuterConeAngle(), sound::SoundData::getOuterConeGain(), sound::SoundData::getPitch(), engine::Object::initialize(), mGain, mInnerConeAngle, mMaxDistance, mMinDistance, mOuterConeAngle, mOuterConeGain, mPitch, mSoundData, and resource::ResourceEvent::source.
void sound::Sound::resourceUnloaded | ( | const resource::ResourceEvent & | evt | ) | [virtual] |
Called just after a Resource has been unloaded.
Reimplemented from resource::ResourceEventReceiver.
References mSoundData, resource::ResourceEvent::source, and engine::Object::uninitialize().
Sets the variables used in the sound projection cone.
innerConeAngle,: | The inside cone angle. |
outerConeAngle,: | The outside cone angle. |
outerConeGain,: | The outer cone gain. |
References setInnerConeAngle(), setOuterConeAngle(), and setOuterConeGain().
Sets the variables used in the distance attenuation calculation.
minDistance,: | The min distance that the sound emitter will cease to continue growing louder at (as it approaches the listener). |
maxDistance,: | The max distance a sound stops attenuating at. |
References setMaxDistance(), and setMinDistance().
void sound::Sound::setInnerConeAngle | ( | f32 | innerConeAngle | ) | [virtual] |
Sets the inner angle of the sound cone for a directional sound.
References mInnerConeAngle.
Referenced by setConeSettings().
void sound::Sound::setLoop | ( | bool | loop | ) | [virtual] |
Sets the looping state.
References mLoop.
void sound::Sound::setMaxDistance | ( | f32 | maxDistance | ) | [virtual] |
void sound::Sound::setMinDistance | ( | f32 | minDistance | ) | [virtual] |
void sound::Sound::setOuterConeAngle | ( | f32 | outerConeAngle | ) | [virtual] |
Sets the outer angle of the sound cone for a directional sound.
References mOuterConeAngle.
Referenced by setConeSettings().
void sound::Sound::setOuterConeGain | ( | f32 | outerConeGain | ) | [virtual] |
Sets the gain outside the sound cone of a directional sound.
References mOuterConeGain.
Referenced by setConeSettings().
void sound::Sound::setSoundData | ( | const std::string & | filename | ) |
Sets the sound data this sound will use.
References resource::Resource::addResourceEventReceiver(), resource::ResourceManager::getInstance(), mSoundData, resource::Resource::removeResourceEventReceiver(), resource::RT_RESOURCE_SOUND_DATA, and engine::Object::uninitialize().
void sound::Sound::setSoundData | ( | SoundData * | soundData | ) |
void sound::Sound::setVelocity | ( | const core::vector3d & | vec | ) |
References scene::Node::mModifiedAbsoluteTransform, and mVelocity.
void sound::Sound::stop | ( | ) | [virtual] |
Stops the sound. Upon calling play again, the sound will resume from the begining.
f32 sound::Sound::mGain [protected] |
Referenced by getGain(), resourceLoaded(), and setGain().
f32 sound::Sound::mInnerConeAngle [protected] |
Referenced by getInnerConeAngle(), resourceLoaded(), and setInnerConeAngle().
bool sound::Sound::mLoop [protected] |
Referenced by initProperties(), isLooping(), and setLoop().
f32 sound::Sound::mMaxDistance [protected] |
Referenced by getMaxDistance(), resourceLoaded(), and setMaxDistance().
f32 sound::Sound::mMinDistance [protected] |
Referenced by getMinDistance(), resourceLoaded(), and setMinDistance().
f32 sound::Sound::mOuterConeAngle [protected] |
Referenced by getOuterConeAngle(), resourceLoaded(), and setOuterConeAngle().
f32 sound::Sound::mOuterConeGain [protected] |
Referenced by getOuterConeGain(), resourceLoaded(), and setOuterConeGain().
f32 sound::Sound::mPitch [protected] |
Referenced by getPitch(), resourceLoaded(), and setPitch().
u32 sound::Sound::msNextGeneratedSoundIndex = 0 [static, protected] |
SoundData* sound::Sound::mSoundData [protected] |
Referenced by getSoundData(), resourceLoaded(), resourceUnloaded(), setSoundData(), Sound(), and ~Sound().
core::vector3d sound::Sound::mVelocity [protected] |
Referenced by getVelocity(), initProperties(), and setVelocity().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:10 by
Doxygen
(1.7.4)
|