Public Member Functions | |
| CompareSources (const CVector &pos) | |
| bool | operator() (const CSimpleSource *s1, const CSimpleSource *s2) |
Data Fields | |
| const CVector & | _Pos |
|
|
Definition at line 1943 of file audio_mixer_user.cpp.
01943 : _Pos(pos) {} |
|
||||||||||||
|
Definition at line 1946 of file audio_mixer_user.cpp. References NLSOUND::CSourceCommon::getPos(), and NLSOUND::CSourceCommon::getPriority().
01947 {
01948 if (s1->getPriority() < s2->getPriority())
01949 {
01950 return true;
01951 }
01952 else if (s1->getPriority() == s2->getPriority())
01953 {
01954 // Equal priority, test distances to the listener
01955 const CVector &src1pos = s1->getPos();
01956 const CVector &src2pos = s2->getPos();;
01957 return ( (src1pos-_Pos).sqrnorm() < (src2pos-_Pos).sqrnorm() );
01958 }
01959 else
01960 {
01961 return false;
01962 }
01963 }
|
|
|
Definition at line 1966 of file audio_mixer_user.cpp. |
1.3.6