#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"
Go to the source code of this file.
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.
static void agent_handle_doubletap_run | ( | EKeystate | s, | |
LLAgent::EDoubleTapRunMode | mode | |||
) | [static] |
Definition at line 87 of file llviewerkeyboard.cpp.
References LLAgent::clearRunning(), gAgent, gAllowTapTapHoldRun, LLAgent::getAlwaysRun(), LLFrameTimer::getElapsedTimeF32(), LLAgent::getRunning(), KEYSTATE_DOWN, KEYSTATE_UP, LLAgent::mDoubleTapRunMode, LLAgent::mDoubleTapRunTimer, NUDGE_TIME, LLFrameTimer::reset(), LLAgent::sendWalkRun(), and LLAgent::setRunning().
Referenced by agent_push_forwardbackward(), and agent_slide_leftright().
void agent_jump | ( | EKeystate | s | ) |
Definition at line 61 of file llviewerkeyboard.cpp.
References FLY_FRAMES, FLY_TIME, gAgent, LLControlGroup::getBOOL(), LLKeyboard::getCurKeyElapsedFrameCount(), LLKeyboard::getCurKeyElapsedTime(), gKeyboard, gSavedSettings, KEYSTATE_UP, llround(), LLAgent::moveUp(), S32, LLAgent::setFlying(), TRUE, and LLAgent::upGrabbed().
Referenced by bind_keyboard_functions(), and camera_spin_over_sitting().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
void bind_keyboard_functions | ( | ) |
Definition at line 523 of file llviewerkeyboard.cpp.
References agent_jump(), agent_look_down(), agent_look_up(), agent_push_backward(), agent_push_down(), agent_push_forward(), agent_slide_left(), agent_slide_right(), agent_toggle_fly(), agent_turn_left(), agent_turn_right(), LLViewerKeyboard::bindNamedFunction(), camera_move_backward(), camera_move_backward_fast(), camera_move_backward_sitting(), camera_move_forward(), camera_move_forward_fast(), camera_move_forward_sitting(), camera_pan_down(), camera_pan_in(), camera_pan_left(), camera_pan_out(), camera_pan_right(), camera_pan_up(), camera_spin_around_ccw(), camera_spin_around_ccw_sitting(), camera_spin_around_cw(), camera_spin_around_cw_sitting(), camera_spin_over(), camera_spin_over_sitting(), camera_spin_under(), camera_spin_under_sitting(), edit_avatar_move_backward(), edit_avatar_move_forward(), edit_avatar_spin_ccw(), edit_avatar_spin_cw(), edit_avatar_spin_over(), edit_avatar_spin_under(), start_chat(), start_gesture(), and stop_moving().
Referenced by LLAppViewer::init().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
F32 get_orbit_rate | ( | ) |
Definition at line 230 of file llviewerkeyboard.cpp.
References LLKeyboard::getCurKeyElapsedTime(), gKeyboard, NUDGE_TIME, and ORBIT_NUDGE_RATE.
Referenced by camera_move_backward(), camera_move_backward_sitting(), camera_move_forward(), camera_move_forward_sitting(), camera_pan_down(), camera_pan_in(), camera_pan_left(), camera_pan_out(), camera_pan_right(), camera_pan_up(), camera_spin_around_ccw(), camera_spin_around_ccw_sitting(), camera_spin_around_cw(), camera_spin_around_cw_sitting(), camera_spin_over(), camera_spin_over_sitting(), camera_spin_under(), camera_spin_under_sitting(), edit_avatar_move_backward(), edit_avatar_move_forward(), edit_avatar_spin_ccw(), edit_avatar_spin_cw(), edit_avatar_spin_over(), and edit_avatar_spin_under().
void start_chat | ( | EKeystate | s | ) |
Definition at line 499 of file llviewerkeyboard.cpp.
References gChatBar, NULL, and LLChatBar::startChat().
Referenced by bind_keyboard_functions().
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().
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().
const F32 FLY_FRAMES = 4 |
Definition at line 59 of file llviewerkeyboard.cpp.
Referenced by LLViewerWindow::handleScanKey(), LLViewerWindow::handleTranslatedKeyDown(), LLViewerWindow::handleUnicodeChar(), and LLAppViewer::init().
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.