listener.cpp

Go to the documentation of this file.
00001 
00032 #include "linden_common.h"
00033 
00034 #include "listener.h"
00035 
00036 #define DEFAULT_AT  0.0f,0.0f,-1.0f
00037 #define DEFAULT_UP  0.0f,1.0f,0.0f
00038 
00039 //-----------------------------------------------------------------------
00040 // constructor
00041 //-----------------------------------------------------------------------
00042 LLListener::LLListener()
00043 {
00044         init();
00045 }
00046 
00047 //-----------------------------------------------------------------------
00048 LLListener::~LLListener()
00049 {
00050 }
00051 
00052 //-----------------------------------------------------------------------
00053 void LLListener::init(void)
00054 {
00055         mPosition.zeroVec();
00056         mListenAt.setVec(DEFAULT_AT);
00057         mListenUp.setVec(DEFAULT_UP);
00058         mVelocity.zeroVec();
00059 }
00060 
00061 //-----------------------------------------------------------------------
00062 void LLListener::free(void)
00063 {
00064 }
00065 
00066 //-----------------------------------------------------------------------
00067 void LLListener::translate(LLVector3 offset)
00068 {
00069         mPosition += offset;
00070 }
00071 
00072 //-----------------------------------------------------------------------
00073 void LLListener::setPosition(LLVector3 pos)
00074 {
00075         mPosition = pos;
00076 }
00077 
00078 //-----------------------------------------------------------------------
00079 LLVector3 LLListener::getPosition(void)
00080 {
00081         return(mPosition);
00082 }
00083 
00084 //-----------------------------------------------------------------------
00085 LLVector3 LLListener::getAt(void)
00086 {
00087         return(mListenAt);
00088 }
00089 
00090 //-----------------------------------------------------------------------
00091 LLVector3 LLListener::getUp(void)
00092 {
00093         return(mListenUp);
00094 }
00095 
00096 //-----------------------------------------------------------------------
00097 void LLListener::setVelocity(LLVector3 vel)
00098 {
00099         mVelocity = vel;
00100 }
00101 
00102 //-----------------------------------------------------------------------
00103 void LLListener::orient(LLVector3 up, LLVector3 at)
00104 {
00105         mListenUp = up;
00106         mListenAt = at;
00107 }
00108 
00109 //-----------------------------------------------------------------------
00110 void LLListener::set(LLVector3 pos, LLVector3 vel, LLVector3 up, LLVector3 at)
00111 {
00112         mPosition = pos;
00113         mVelocity = vel;
00114 
00115         setPosition(pos);
00116         setVelocity(vel);
00117         orient(up,at);
00118 }
00119 
00120 //-----------------------------------------------------------------------
00121 void LLListener::setDopplerFactor(F32 factor)
00122 {
00123 }
00124 
00125 //-----------------------------------------------------------------------
00126 F32 LLListener::getDopplerFactor()
00127 {
00128         return (1.f);
00129 }
00130 
00131 //-----------------------------------------------------------------------
00132 void LLListener::setDistanceFactor(F32 factor)
00133 {
00134 }
00135 
00136 //-----------------------------------------------------------------------
00137 F32 LLListener::getDistanceFactor()
00138 {
00139         return (1.f);
00140 }
00141 
00142 //-----------------------------------------------------------------------
00143 void LLListener::setRolloffFactor(F32 factor)
00144 {
00145 }
00146 
00147 //-----------------------------------------------------------------------
00148 F32 LLListener::getRolloffFactor()
00149 {
00150         return (1.f);
00151 }
00152 
00153 //-----------------------------------------------------------------------
00154 void LLListener::commitDeferredChanges()
00155 {
00156 }
00157 

Generated on Thu Jul 1 06:08:17 2010 for Second Life Viewer by  doxygen 1.4.7