llviewerkeyboard.cpp File Reference

LLViewerKeyboard class implementation. More...

#include "llviewerprecompiledheaders.h"
#include "llappviewer.h"
#include "llviewerkeyboard.h"
#include "llmath.h"
#include "llagent.h"
#include "llchatbar.h"
#include "llviewercontrol.h"
#include "llfocusmgr.h"
#include "llmorphview.h"
#include "llmoveview.h"
#include "lltoolfocus.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"

Include dependency graph for llviewerkeyboard.cpp:

Go to the source code of this file.

Functions

void agent_jump (EKeystate s)
void agent_push_down (EKeystate s)
static void agent_handle_doubletap_run (EKeystate s, LLAgent::EDoubleTapRunMode mode)
static void agent_push_forwardbackward (EKeystate s, S32 direction, LLAgent::EDoubleTapRunMode mode)
void agent_push_forward (EKeystate s)
void agent_push_backward (EKeystate s)
static void agent_slide_leftright (EKeystate s, S32 direction, LLAgent::EDoubleTapRunMode mode)
void agent_slide_left (EKeystate s)
void agent_slide_right (EKeystate s)
void agent_turn_left (EKeystate s)
void agent_turn_right (EKeystate s)
void agent_look_up (EKeystate s)
void agent_look_down (EKeystate s)
void agent_toggle_fly (EKeystate s)
F32 get_orbit_rate ()
void camera_spin_around_ccw (EKeystate s)
void camera_spin_around_cw (EKeystate s)
void camera_spin_around_ccw_sitting (EKeystate s)
void camera_spin_around_cw_sitting (EKeystate s)
void camera_spin_over (EKeystate s)
void camera_spin_under (EKeystate s)
void camera_spin_over_sitting (EKeystate s)
void camera_spin_under_sitting (EKeystate s)
void camera_move_forward (EKeystate s)
void camera_move_backward (EKeystate s)
void camera_move_forward_sitting (EKeystate s)
void camera_move_backward_sitting (EKeystate s)
void camera_pan_up (EKeystate s)
void camera_pan_down (EKeystate s)
void camera_pan_left (EKeystate s)
void camera_pan_right (EKeystate s)
void camera_pan_in (EKeystate s)
void camera_pan_out (EKeystate s)
void camera_move_forward_fast (EKeystate s)
void camera_move_backward_fast (EKeystate s)
void edit_avatar_spin_ccw (EKeystate s)
void edit_avatar_spin_cw (EKeystate s)
void edit_avatar_spin_over (EKeystate s)
void edit_avatar_spin_under (EKeystate s)
void edit_avatar_move_forward (EKeystate s)
void edit_avatar_move_backward (EKeystate s)
void stop_moving (EKeystate s)
void start_chat (EKeystate s)
void start_gesture (EKeystate s)
void bind_keyboard_functions ()

Variables

const F32 FLY_TIME = 0.5f
const F32 FLY_FRAMES = 4
const F32 NUDGE_TIME = 0.25f
const S32 NUDGE_FRAMES = 2
const F32 ORBIT_NUDGE_RATE = 0.05f
const F32 YAW_NUDGE_RATE = 0.05f
LLViewerKeyboard gViewerKeyboard


Detailed Description

LLViewerKeyboard class implementation.

LicenseInfo
firstyear=2005&license=viewergpl

Copyright (c) 2005-2008, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llviewerkeyboard.cpp.


Function Documentation

static void agent_handle_doubletap_run ( EKeystate  s,
LLAgent::EDoubleTapRunMode  mode 
) [static]

void agent_jump ( EKeystate  s  ) 

void agent_look_down ( EKeystate  s  ) 

Definition at line 214 of file llviewerkeyboard.cpp.

References gAgent, KEYSTATE_UP, and LLAgent::movePitch().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_look_up ( EKeystate  s  ) 

Definition at line 206 of file llviewerkeyboard.cpp.

References gAgent, KEYSTATE_UP, and LLAgent::movePitch().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_push_backward ( EKeystate  s  ) 

Definition at line 143 of file llviewerkeyboard.cpp.

References agent_push_forwardbackward(), and LLAgent::DOUBLETAP_BACKWARD.

Referenced by bind_keyboard_functions(), and camera_move_backward_sitting().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_push_down ( EKeystate  s  ) 

Definition at line 81 of file llviewerkeyboard.cpp.

References gAgent, KEYSTATE_UP, and LLAgent::moveUp().

Referenced by bind_keyboard_functions(), and camera_spin_under_sitting().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_push_forward ( EKeystate  s  ) 

Definition at line 137 of file llviewerkeyboard.cpp.

References agent_push_forwardbackward(), and LLAgent::DOUBLETAP_FORWARD.

Referenced by bind_keyboard_functions(), and camera_move_forward_sitting().

Here is the call graph for this function:

Here is the caller graph for this function:

static void agent_push_forwardbackward ( EKeystate  s,
S32  direction,
LLAgent::EDoubleTapRunMode  mode 
) [static]

Definition at line 119 of file llviewerkeyboard.cpp.

References agent_handle_doubletap_run(), gAgent, LLKeyboard::getCurKeyElapsedFrameCount(), LLKeyboard::getCurKeyElapsedTime(), gKeyboard, KEYSTATE_UP, llround(), LLAgent::moveAt(), LLAgent::moveAtNudge(), NUDGE_FRAMES, NUDGE_TIME, and S32.

Referenced by agent_push_backward(), and agent_push_forward().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_slide_left ( EKeystate  s  ) 

Definition at line 166 of file llviewerkeyboard.cpp.

References agent_slide_leftright(), and LLAgent::DOUBLETAP_SLIDELEFT.

Referenced by agent_turn_left(), and bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

static void agent_slide_leftright ( EKeystate  s,
S32  direction,
LLAgent::EDoubleTapRunMode  mode 
) [static]

Definition at line 148 of file llviewerkeyboard.cpp.

References agent_handle_doubletap_run(), gAgent, LLKeyboard::getCurKeyElapsedFrameCount(), LLKeyboard::getCurKeyElapsedTime(), gKeyboard, KEYSTATE_UP, llround(), LLAgent::moveLeft(), LLAgent::moveLeftNudge(), NUDGE_FRAMES, NUDGE_TIME, and S32.

Referenced by agent_slide_left(), and agent_slide_right().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_slide_right ( EKeystate  s  ) 

Definition at line 172 of file llviewerkeyboard.cpp.

References agent_slide_leftright(), and LLAgent::DOUBLETAP_SLIDERIGHT.

Referenced by agent_turn_right(), and bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_toggle_fly ( EKeystate  s  ) 

Definition at line 221 of file llviewerkeyboard.cpp.

References gAgent, KEYSTATE_DOWN, and LLAgent::toggleFlying().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_turn_left ( EKeystate  s  ) 

Definition at line 177 of file llviewerkeyboard.cpp.

References agent_slide_left(), gAgent, LLKeyboard::getCurKeyElapsedTime(), LLSingleton< LLToolCamera >::getInstance(), LLFloaterMove::getYawRate(), gKeyboard, KEYSTATE_UP, and LLAgent::moveYaw().

Referenced by bind_keyboard_functions(), and camera_spin_around_cw_sitting().

Here is the call graph for this function:

Here is the caller graph for this function:

void agent_turn_right ( EKeystate  s  ) 

Definition at line 192 of file llviewerkeyboard.cpp.

References agent_slide_right(), gAgent, LLKeyboard::getCurKeyElapsedTime(), LLSingleton< LLToolCamera >::getInstance(), LLFloaterMove::getYawRate(), gKeyboard, KEYSTATE_UP, and LLAgent::moveYaw().

Referenced by bind_keyboard_functions(), and camera_spin_around_ccw_sitting().

Here is the call graph for this function:

Here is the caller graph for this function:

void bind_keyboard_functions (  ) 

void camera_move_backward ( EKeystate  s  ) 

Definition at line 346 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitOutKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_move_backward_fast ( EKeystate  s  ) 

Definition at line 430 of file llviewerkeyboard.cpp.

References gAgent, KEYSTATE_UP, LLAgent::setOrbitOutKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_move_backward_sitting ( EKeystate  s  ) 

Definition at line 367 of file llviewerkeyboard.cpp.

References agent_push_backward(), LLAgent::backwardGrabbed(), gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitOutKey(), and LLAgent::sitCameraEnabled().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_move_forward ( EKeystate  s  ) 

Definition at line 338 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitInKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_move_forward_fast ( EKeystate  s  ) 

Definition at line 423 of file llviewerkeyboard.cpp.

References gAgent, KEYSTATE_UP, LLAgent::setOrbitInKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_move_forward_sitting ( EKeystate  s  ) 

Definition at line 353 of file llviewerkeyboard.cpp.

References agent_push_forward(), LLAgent::forwardGrabbed(), gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitInKey(), and LLAgent::sitCameraEnabled().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_pan_down ( EKeystate  s  ) 

Definition at line 388 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setPanDownKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_pan_in ( EKeystate  s  ) 

Definition at line 409 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setPanInKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_pan_left ( EKeystate  s  ) 

Definition at line 395 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setPanLeftKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_pan_out ( EKeystate  s  ) 

Definition at line 416 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setPanOutKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_pan_right ( EKeystate  s  ) 

Definition at line 402 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setPanRightKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_pan_up ( EKeystate  s  ) 

Definition at line 381 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setPanUpKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_around_ccw ( EKeystate  s  ) 

Definition at line 245 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitLeftKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_around_ccw_sitting ( EKeystate  s  ) 

Definition at line 260 of file llviewerkeyboard.cpp.

References agent_turn_right(), gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::rotateGrabbed(), LLAgent::setOrbitLeftKey(), and LLAgent::sitCameraEnabled().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_around_cw ( EKeystate  s  ) 

Definition at line 253 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitRightKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_around_cw_sitting ( EKeystate  s  ) 

Definition at line 276 of file llviewerkeyboard.cpp.

References agent_turn_left(), gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::rotateGrabbed(), LLAgent::setOrbitRightKey(), and LLAgent::sitCameraEnabled().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_over ( EKeystate  s  ) 

Definition at line 292 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitUpKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_over_sitting ( EKeystate  s  ) 

Definition at line 307 of file llviewerkeyboard.cpp.

References agent_jump(), gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitUpKey(), LLAgent::sitCameraEnabled(), and LLAgent::upGrabbed().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_under ( EKeystate  s  ) 

Definition at line 300 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitDownKey(), and LLAgent::unlockView().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void camera_spin_under_sitting ( EKeystate  s  ) 

Definition at line 323 of file llviewerkeyboard.cpp.

References agent_push_down(), LLAgent::downGrabbed(), gAgent, get_orbit_rate(), KEYSTATE_UP, LLAgent::setOrbitDownKey(), and LLAgent::sitCameraEnabled().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_avatar_move_backward ( EKeystate  s  ) 

Definition at line 481 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), gMorphView, KEYSTATE_UP, LLMorphView::setCameraDrivenByKeys(), LLAgent::setOrbitOutKey(), and TRUE.

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_avatar_move_forward ( EKeystate  s  ) 

Definition at line 472 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), gMorphView, KEYSTATE_UP, LLMorphView::setCameraDrivenByKeys(), LLAgent::setOrbitInKey(), and TRUE.

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_avatar_spin_ccw ( EKeystate  s  ) 

Definition at line 438 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), gMorphView, KEYSTATE_UP, LLMorphView::setCameraDrivenByKeys(), LLAgent::setOrbitLeftKey(), and TRUE.

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_avatar_spin_cw ( EKeystate  s  ) 

Definition at line 447 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), gMorphView, KEYSTATE_UP, LLMorphView::setCameraDrivenByKeys(), LLAgent::setOrbitRightKey(), and TRUE.

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_avatar_spin_over ( EKeystate  s  ) 

Definition at line 455 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), gMorphView, KEYSTATE_UP, LLMorphView::setCameraDrivenByKeys(), LLAgent::setOrbitUpKey(), and TRUE.

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void edit_avatar_spin_under ( EKeystate  s  ) 

Definition at line 464 of file llviewerkeyboard.cpp.

References gAgent, get_orbit_rate(), gMorphView, KEYSTATE_UP, LLMorphView::setCameraDrivenByKeys(), LLAgent::setOrbitDownKey(), and TRUE.

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 get_orbit_rate (  ) 

void start_chat ( EKeystate  s  ) 

Definition at line 499 of file llviewerkeyboard.cpp.

References gChatBar, NULL, and LLChatBar::startChat().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void start_gesture ( EKeystate  s  ) 

Definition at line 505 of file llviewerkeyboard.cpp.

References LLUICtrl::acceptsTextInput(), gChatBar, LLChatBar::getCurrentChat(), LLFocusMgr::getKeyboardFocus(), gFocusMgr, KEYSTATE_UP, NULL, and LLChatBar::startChat().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:

void stop_moving ( EKeystate  s  ) 

Definition at line 489 of file llviewerkeyboard.cpp.

References AGENT_CONTROL_STOP, gAgent, KEYSTATE_UP, LLAgent::setControlFlags(), and LLAgent::stopAutoPilot().

Referenced by bind_keyboard_functions().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const F32 FLY_FRAMES = 4

Definition at line 52 of file llviewerkeyboard.cpp.

Referenced by agent_jump().

const F32 FLY_TIME = 0.5f

Definition at line 51 of file llviewerkeyboard.cpp.

Referenced by agent_jump().

const S32 NUDGE_FRAMES = 2

Definition at line 55 of file llviewerkeyboard.cpp.

Referenced by agent_push_forwardbackward(), and agent_slide_leftright().

const F32 NUDGE_TIME = 0.25f

Definition at line 54 of file llviewerkeyboard.cpp.

const F32 ORBIT_NUDGE_RATE = 0.05f

Definition at line 56 of file llviewerkeyboard.cpp.

const F32 YAW_NUDGE_RATE = 0.05f

Definition at line 57 of file llviewerkeyboard.cpp.


Generated on Fri May 16 08:37:32 2008 for SecondLife by  doxygen 1.5.5