00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VRS_SOUND_DOPPLEREFFECTAL_H
00018 #define VRS_SOUND_DOPPLEREFFECTAL_H
00019
00020
00021
00022
00023 #include <vrs/openal/config.h>
00024
00025
00026
00027
00028 #include <vrs/vector.h>
00029 #include <vrs/monoattribute.h>
00030
00031
00032 namespace VRS
00033 {
00034 namespace SOUND
00035 {
00036 class VRS_OPENAL_API DopplerEffectAL : public MonoAttribute
00037 {
00038 public:
00039
00040
00046 DopplerEffectAL(float dopplerFactor,
00047 float speedOfSound = 343.3f,
00048 bool enabled = true);
00049
00051 void setDopplerFactor(float dopplerFactor);
00052 inline float getDopplerFactor(void) const
00053 {
00054 return this->dopplerFactor_;
00055 }
00056
00058 void setSpeedOfSound(float speedOfSound);
00059 inline float getSpeedOfSound(void) const
00060 {
00061 return this->speedOfSound_;
00062 }
00063
00064 VRS_TYPEINFO(DopplerEffectAL, MonoAttribute);
00065 VRS_SERIALIZABLE(DopplerEffectAL);
00066
00067 protected:
00068
00069 DopplerEffectAL(void);
00070
00071 private:
00072
00073 float dopplerFactor_;
00074 float speedOfSound_;
00075
00076 };
00077
00078 };
00079
00080 };
00081
00082 #endif //VRS_SOUND_DOPPLEREFFECTAL_H