LLViewerJoystick Class Reference

#include <llviewerjoystick.h>

Inheritance diagram for LLViewerJoystick:

Inheritance graph
[legend]
Collaboration diagram for LLViewerJoystick:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLViewerJoystick ()
virtual ~LLViewerJoystick ()
void init (bool autoenable)
void updateStatus ()
void scanJoystick ()
void moveObjects (bool reset=false)
void moveAvatar (bool reset=false)
void moveFlycam (bool reset=false)
F32 getJoystickAxis (U32 axis) const
U32 getJoystickButton (U32 button) const
bool isJoystickInitialized () const
bool isLikeSpaceNavigator () const
void setNeedsReset (bool reset=true)
void setCameraNeedsUpdate (bool b)
bool getCameraNeedsUpdate () const
bool getOverrideCamera ()
void setOverrideCamera (bool val)
bool toggleFlycam ()
void setSNDefaults ()
std::string getDescription ()

Protected Member Functions

void updateEnabled (bool autoenable)
void terminate ()
void agentSlide (F32 inc)
void agentPush (F32 inc)
void agentFly (F32 inc)
void agentRotate (F32 pitch_inc, F32 turn_inc)
void agentJump ()
void resetDeltas (S32 axis[], bool flycam_and_build=false)

Private Attributes

F32 mAxes [6]
long mBtn [16]
EJoystickDriverState mDriverState
NDOF_Device * mNdofDev
bool mResetFlag
F32 mPerfScale
bool mCameraUpdated
bool mOverrideCamera

Static Private Attributes

static F32 sLastDelta [7] = {0,0,0,0,0,0,0}
static F32 sDelta [7] = {0,0,0,0,0,0,0}


Detailed Description

Definition at line 53 of file llviewerjoystick.h.


Constructor & Destructor Documentation

LLViewerJoystick::LLViewerJoystick (  ) 

Definition at line 140 of file llviewerjoystick.cpp.

References LLCPUInfo::getMhz(), gSysCPU, i, mAxes, mBtn, mPerfScale, sDelta, and sLastDelta.

Here is the call graph for this function:

LLViewerJoystick::~LLViewerJoystick (  )  [virtual]

Definition at line 159 of file llviewerjoystick.cpp.

References JDS_INITIALIZED, mDriverState, and terminate().

Here is the call graph for this function:


Member Function Documentation

void LLViewerJoystick::init ( bool  autoenable  ) 

void LLViewerJoystick::updateStatus (  ) 

Definition at line 280 of file llviewerjoystick.cpp.

References i, mAxes, mBtn, and mNdofDev.

Referenced by LLViewerWindow::handleTimerEvent(), and scanJoystick().

Here is the caller graph for this function:

void LLViewerJoystick::scanJoystick (  ) 

Definition at line 898 of file llviewerjoystick.cpp.

References LLControlGroup::getBOOL(), LLSingleton< LLToolMgr >::getInstance(), gSavedSettings, JDS_INITIALIZED, mBtn, mDriverState, moveAvatar(), mOverrideCamera, toggleFlycam(), and updateStatus().

Referenced by LLAppViewer::mainLoop().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::moveObjects ( bool  reset = false  ) 

void LLViewerJoystick::moveAvatar ( bool  reset = false  ) 

void LLViewerJoystick::moveFlycam ( bool  reset = false  ) 

F32 LLViewerJoystick::getJoystickAxis ( U32  axis  )  const

Definition at line 300 of file llviewerjoystick.cpp.

References mAxes.

Referenced by LLFloaterJoystick::draw(), and moveFlycam().

Here is the caller graph for this function:

U32 LLViewerJoystick::getJoystickButton ( U32  button  )  const

Definition at line 310 of file llviewerjoystick.cpp.

References mBtn.

bool LLViewerJoystick::isJoystickInitialized (  )  const [inline]

Definition at line 67 of file llviewerjoystick.h.

References JDS_INITIALIZED, and mDriverState.

Referenced by LLFloaterJoystick::draw(), and isLikeSpaceNavigator().

Here is the caller graph for this function:

bool LLViewerJoystick::isLikeSpaceNavigator (  )  const

Definition at line 945 of file llviewerjoystick.cpp.

References isJoystickInitialized(), and mNdofDev.

Referenced by init(), and updateEnabled().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::setNeedsReset ( bool  reset = true  )  [inline]

Definition at line 69 of file llviewerjoystick.h.

References mResetFlag.

Referenced by LLViewerWindow::handleActivateApp(), LLObjectEdit::handleEvent(), LLAppViewer::mainLoop(), and toggleFlycam().

Here is the caller graph for this function:

void LLViewerJoystick::setCameraNeedsUpdate ( bool  b  )  [inline]

Definition at line 70 of file llviewerjoystick.h.

References mCameraUpdated.

Referenced by handleJoystickChanged(), LLViewerWindow::handleScanKey(), and toggleFlycam().

Here is the caller graph for this function:

bool LLViewerJoystick::getCameraNeedsUpdate (  )  const [inline]

Definition at line 71 of file llviewerjoystick.h.

References mCameraUpdated.

bool LLViewerJoystick::getOverrideCamera (  )  [inline]

Definition at line 72 of file llviewerjoystick.h.

References mOverrideCamera.

Referenced by LLPipeline::calcNearbyLights(), and LLViewCheckJoystickFlycam::handleEvent().

Here is the caller graph for this function:

void LLViewerJoystick::setOverrideCamera ( bool  val  ) 

Definition at line 92 of file llviewerjoystick.cpp.

References FALSE, LLControlGroup::getBOOL(), gSavedSettings, and mOverrideCamera.

Here is the call graph for this function:

bool LLViewerJoystick::toggleFlycam (  ) 

Definition at line 872 of file llviewerjoystick.cpp.

References LLControlGroup::getBOOL(), LLSingleton< LLToolMgr >::getInstance(), gSavedSettings, moveAvatar(), moveFlycam(), mOverrideCamera, setCameraNeedsUpdate(), and setNeedsReset().

Referenced by handle_toggle_flycam(), and scanJoystick().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::setSNDefaults (  ) 

Definition at line 959 of file llviewerjoystick.cpp.

References gSavedSettings, kPlatformScale, llendl, llinfos, LLControlGroup::setBOOL(), LLControlGroup::setF32(), and LLControlGroup::setS32().

Referenced by init(), and LLFloaterJoystick::setSNDefaults().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string LLViewerJoystick::getDescription ( void   ) 

Definition at line 933 of file llviewerjoystick.cpp.

References JDS_INITIALIZED, ll_safe_string(), mDriverState, and mNdofDev.

Referenced by LLFloaterJoystick::draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::updateEnabled ( bool  autoenable  )  [protected]

Definition at line 73 of file llviewerjoystick.cpp.

References FALSE, LLControlGroup::getBOOL(), gSavedSettings, isLikeSpaceNavigator(), JDS_UNINITIALIZED, mDriverState, mOverrideCamera, LLControlGroup::setBOOL(), and TRUE.

Referenced by init().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::terminate (  )  [protected]

Definition at line 269 of file llviewerjoystick.cpp.

References llendl, and llinfos.

Referenced by ~LLViewerJoystick().

Here is the caller graph for this function:

void LLViewerJoystick::agentSlide ( F32  inc  )  [protected]

Definition at line 326 of file llviewerjoystick.cpp.

References gAgent, and LLAgent::moveLeft().

Referenced by moveAvatar().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::agentPush ( F32  inc  )  [protected]

Definition at line 339 of file llviewerjoystick.cpp.

References gAgent, and LLAgent::moveAt().

Referenced by moveAvatar().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::agentFly ( F32  inc  )  [protected]

Definition at line 352 of file llviewerjoystick.cpp.

References gAgent, LLAgent::getFlying(), LLAgent::moveUp(), and LLAgent::setFlying().

Referenced by moveAvatar().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::agentRotate ( F32  pitch_inc,
F32  turn_inc 
) [protected]

Definition at line 373 of file llviewerjoystick.cpp.

References LLAgent::clampPitchToLimits(), gAgent, LLAgent::getLeftAxis(), LLAgent::getReferenceUpVector(), LLAgent::rotate(), and LLQuaternion::setQuat().

Referenced by moveAvatar().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::agentJump (  )  [protected]

Definition at line 320 of file llviewerjoystick.cpp.

References gAgent, and LLAgent::moveUp().

Referenced by moveAvatar().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerJoystick::resetDeltas ( S32  axis[],
bool  flycam_and_build = false 
) [protected]

Definition at line 384 of file llviewerjoystick.cpp.

References BUILDMODE_FLYCAM_T_SCALE, i, mAxes, mResetFlag, sDelta, sLastDelta, X_I, Y_I, and Z_I.

Referenced by moveAvatar(), moveFlycam(), and moveObjects().

Here is the caller graph for this function:


Member Data Documentation

long LLViewerJoystick::mBtn[16] [private]

NDOF_Device* LLViewerJoystick::mNdofDev [private]

Definition at line 97 of file llviewerjoystick.h.

Referenced by moveAvatar(), moveFlycam(), moveObjects(), resetDeltas(), and setNeedsReset().

Definition at line 98 of file llviewerjoystick.h.

Referenced by LLViewerJoystick(), and moveAvatar().

Definition at line 99 of file llviewerjoystick.h.

Referenced by getCameraNeedsUpdate(), and setCameraNeedsUpdate().

F32 LLViewerJoystick::sLastDelta = {0,0,0,0,0,0,0} [static, private]

F32 LLViewerJoystick::sDelta = {0,0,0,0,0,0,0} [static, private]


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:27:37 2008 for SecondLife by  doxygen 1.5.5