|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLSOUND::CEnvSoundUser Class ReferenceImplementation of UEnvSound.
More...
#include <env_sound_user.h>
Inheritance diagram for NLSOUND::CEnvSoundUser:
List of all members.
Public Methods |
| CEnvSoundUser () |
| Constructor. More...
|
virtual | ~CEnvSoundUser () |
| Destructor. More...
|
virtual const NLMISC::CVector & | getPos () const |
| Return the position. More...
|
virtual void | setPos (const NLMISC::CVector &pos) |
| Moves the envsound (and its transition envsound if it has one). More...
|
virtual void | selectEnv (const char *tag, bool children_too=false) |
| Select the current env for this node, and for all descendants if children_too is true. More...
|
virtual std::vector< UEnvSound * > & | getChildren () |
| Return the children envsounds. More...
|
void | recompute () |
| Recompute the EnvSound. Call this method after having moved the 3D source (call only on the root env). More...
|
void | update () |
| Update the stereo mixes (call evenly on the root) (recursive). More...
|
virtual void | play (bool children_too=false) |
| Play this node, and all descendants if children_too is true. More...
|
virtual void | stop (bool children_too=false) |
| Stop playing this node, and all descendants if children_too is true. More...
|
bool | mustPlay () const |
| Return the play flag. More...
|
void | setProperties (bool transition, IBoundingShape *bshape) |
| Set properties (EDIT) (set a NULL shape for all world). More...
|
void | addChild (CEnvSoundUser *child) |
| Add a child (EDIT). More...
|
void | addEnvTag (IPlayable *source, const std::string &tag="") |
| Add an environment source/tag (EDIT) (set a NULL source for no source at all). More...
|
IBoundingShape * | getBoundingShape () |
| Return the bounding shape (EDIT). More...
|
IPlayable * | getSource () |
| Return the source (EDIT). More...
|
CEnvSoundUser * | getParent () |
| Return the parent (EDIT). More...
|
Protected Methods |
bool | isRoot () const |
| Return true if the envsound is the root of the hierarchy tree. More...
|
void | applySourcesMarks () |
CEnvSoundUser * | findCurrentEnv (const NLMISC::CVector &listenerpos) |
| Find the area where the listener is located (recursive). More...
|
void | markSources (const NLMISC::CVector &listenerpos, float gain) |
| Prepare the related sources to play (recursive). More...
|
uint32 | getCount () const |
| Count the envs in the tree (call on the root). More...
|
void | playSub (bool children_too=false) |
| Play this node, and all descendants if children_too is true, but do not recompute. More...
|
void | stopSub (bool children_too=false) |
| Stop playing this node, and all descendants if children_too is true, but do not recompute. More...
|
Private Attributes |
bool | _Play |
IPlayable * | _Source |
std::vector< IPlayable * > | _SrcBank |
std::vector< std::string > | _Tags |
IBoundingShape * | _BoundingShape |
bool | _Transition |
CEnvSoundUser * | _Parent |
std::vector< CEnvSoundUser * > | _Children |
bool | _Mark |
float | _Gain |
Detailed Description
Implementation of UEnvSound.
An envsound object is a node of an envsound tree, the root of which is returned by CAudioMixerUser::loadEnvSounds() and getEnvSounds(). The root is the world envsound: it has no bounds. The areas of children envsounds have bounds and they must be totally included in the area of their parent envsound.
Here is an example of an envsound tree:
* Root (world envsound)
* / \
* Transition Transition
* | |
* Cave1 City
* / \
* Transition Transition
* | |
* Building1 Building2
*
In a transition, the _Source object is the center source played when the listener not in the child area (CSimpleSource). In a non-transition envsound, the _Source object is the ambiant source (CAmbiantSource) which plays a stereo mix.
-
Author:
-
Olivier Cado , Nevrax France
-
Date:
-
2001
Definition at line 82 of file env_sound_user.h.
Constructor & Destructor Documentation
NLSOUND::CEnvSoundUser::CEnvSoundUser |
( |
|
) |
|
|
NLSOUND::CEnvSoundUser::~CEnvSoundUser |
( |
|
) |
[virtual] |
|
Member Function Documentation
void NLSOUND::CEnvSoundUser::addChild |
( |
CEnvSoundUser * |
child |
) |
|
|
void NLSOUND::CEnvSoundUser::addEnvTag |
( |
IPlayable * |
source, |
|
|
const std::string & |
tag = "" |
|
) |
|
|
|
Add an environment source/tag (EDIT) (set a NULL source for no source at all).
The current source always becomes the first one.
Definition at line 487 of file env_sound_user.cpp.
References _Source, _SrcBank, and _Tags. |
void NLSOUND::CEnvSoundUser::applySourcesMarks |
( |
|
) |
[protected] |
|
CEnvSoundUser * NLSOUND::CEnvSoundUser::findCurrentEnv |
( |
const NLMISC::CVector & |
listenerpos |
) |
[protected] |
|
IBoundingShape* NLSOUND::CEnvSoundUser::getBoundingShape |
( |
|
) |
[inline] |
|
std::vector< UEnvSound * > & NLSOUND::CEnvSoundUser::getChildren |
( |
|
) |
[virtual] |
|
uint32 NLSOUND::CEnvSoundUser::getCount |
( |
|
) |
const [protected] |
|
CEnvSoundUser* NLSOUND::CEnvSoundUser::getParent |
( |
|
) |
[inline] |
|
virtual const NLMISC::CVector& NLSOUND::CEnvSoundUser::getPos |
( |
|
) |
const [virtual] |
|
IPlayable* NLSOUND::CEnvSoundUser::getSource |
( |
|
) |
[inline] |
|
bool NLSOUND::CEnvSoundUser::isRoot |
( |
|
) |
const [inline, protected] |
|
void NLSOUND::CEnvSoundUser::markSources |
( |
const NLMISC::CVector & |
listenerpos, |
|
|
float |
gain |
|
) |
[protected] |
|
bool NLSOUND::CEnvSoundUser::mustPlay |
( |
|
) |
const [inline] |
|
void NLSOUND::CEnvSoundUser::play |
( |
bool |
children_too = false |
) |
[virtual] |
|
void NLSOUND::CEnvSoundUser::playSub |
( |
bool |
children_too = false |
) |
[protected] |
|
void NLSOUND::CEnvSoundUser::recompute |
( |
|
) |
|
|
void NLSOUND::CEnvSoundUser::selectEnv |
( |
const char * |
tag, |
|
|
bool |
children_too = false |
|
) |
[virtual] |
|
void NLSOUND::CEnvSoundUser::setPos |
( |
const NLMISC::CVector & |
pos |
) |
[virtual] |
|
void NLSOUND::CEnvSoundUser::setProperties |
( |
bool |
transition, |
|
|
IBoundingShape * |
bshape |
|
) |
|
|
void NLSOUND::CEnvSoundUser::stop |
( |
bool |
children_too = false |
) |
[virtual] |
|
void NLSOUND::CEnvSoundUser::stopSub |
( |
bool |
children_too = false |
) |
[protected] |
|
void NLSOUND::CEnvSoundUser::update |
( |
|
) |
|
|
Member Data Documentation
IBoundingShape* NLSOUND::CEnvSoundUser::_BoundingShape [private]
|
|
std::vector<CEnvSoundUser*> NLSOUND::CEnvSoundUser::_Children [private]
|
|
float NLSOUND::CEnvSoundUser::_Gain [private]
|
|
bool NLSOUND::CEnvSoundUser::_Mark [private]
|
|
CEnvSoundUser* NLSOUND::CEnvSoundUser::_Parent [private]
|
|
bool NLSOUND::CEnvSoundUser::_Play [private]
|
|
IPlayable* NLSOUND::CEnvSoundUser::_Source [private]
|
|
std::vector<IPlayable*> NLSOUND::CEnvSoundUser::_SrcBank [private]
|
|
std::vector<std::string> NLSOUND::CEnvSoundUser::_Tags [private]
|
|
bool NLSOUND::CEnvSoundUser::_Transition [private]
|
|
The documentation for this class was generated from the following files:
|
|