llagent.cpp File Reference

LLAgent class implementation. More...

#include "llviewerprecompiledheaders.h"
#include "stdtypes.h"
#include "stdenums.h"
#include "llagent.h"
#include "llcoordframe.h"
#include "indra_constants.h"
#include "llmath.h"
#include "llcriticaldamp.h"
#include "llfocusmgr.h"
#include "llglheaders.h"
#include "llparcel.h"
#include "llpermissions.h"
#include "llregionhandle.h"
#include "m3math.h"
#include "m4math.h"
#include "message.h"
#include "llquaternion.h"
#include "v3math.h"
#include "v4math.h"
#include "llsdutil.h"
#include "imageids.h"
#include "llbox.h"
#include "llbutton.h"
#include "llcameraview.h"
#include "llcallingcard.h"
#include "llchatbar.h"
#include "llconsole.h"
#include "lldrawable.h"
#include "llface.h"
#include "llfirstuse.h"
#include "llfloater.h"
#include "llfloateractivespeakers.h"
#include "llfloateravatarinfo.h"
#include "llfloateravatarlist.h"
#include "llfloaterbuildoptions.h"
#include "llfloaterchat.h"
#include "llfloatercustomize.h"
#include "llfloaterdirectory.h"
#include "llfloatergroupinfo.h"
#include "llfloatergroups.h"
#include "llfloatermap.h"
#include "llfloatermute.h"
#include "llfloatersnapshot.h"
#include "llfloatertools.h"
#include "llfloaterworldmap.h"
#include "llgroupmgr.h"
#include "llhudeffectlookat.h"
#include "llhudmanager.h"
#include "llinventorymodel.h"
#include "llinventoryview.h"
#include "lljoystickbutton.h"
#include "llmenugl.h"
#include "llmorphview.h"
#include "llmoveview.h"
#include "llnotify.h"
#include "llquantize.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "llsphere.h"
#include "llstatusbar.h"
#include "llimview.h"
#include "lltool.h"
#include "lltoolcomp.h"
#include "lltoolfocus.h"
#include "lltoolgrab.h"
#include "lltoolmgr.h"
#include "lltoolpie.h"
#include "lltoolview.h"
#include "llui.h"
#include "llviewercamera.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
#include "llviewernetwork.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
#include "llviewerparceloverlay.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llvoground.h"
#include "llvosky.h"
#include "llwearable.h"
#include "llwearablelist.h"
#include "llworld.h"
#include "llworldmap.h"
#include "pipeline.h"
#include "roles_constants.h"
#include "viewer.h"
#include "llvoiceclient.h"
#include "llfollowcam.h"

Include dependency graph for llagent.cpp:

Go to the source code of this file.

Classes

class  LLAgentFriendObserver
class  LLAgentGroupDataUpdateViewerNode
struct  LLSetWearableData

Functions

const LLVector3d FACE_EDIT_TARGET_OFFSET (0.f, 0.f, 0.05f)
std::ostream & operator<< (std::ostream &s, const LLAgent &agent)
static const LLFloaterView::skip_list_tget_skip_list ()
void update_group_floaters (const LLUUID &group_id)

Variables

LLMenuBarGLgMenuBarView
U8 gLastPickAlpha
F32 gFrameDTClamped
const F32 MAX_WANDER_TIME = 20.f
const F32 MAX_HEADING_HALF_ERROR = 0.2f
const F32 WANDER_MAX_SLEW_RATE = 2.f * DEG_TO_RAD
const F32 WANDER_TARGET_MIN_DISTANCE = 10.f
const F32 AUTOPILOT_HEADING_HALF_ERROR = 10.f * DEG_TO_RAD
const F32 AUTOPILOT_MAX_SLEW_RATE = 1.f * DEG_TO_RAD
const F32 AUTOPILOT_STOP_DISTANCE = 2.f
const F32 AUTOPILOT_HEIGHT_ADJUST_DISTANCE = 8.f
const F32 AUTOPILOT_MIN_TARGET_HEIGHT_OFF_GROUND = 1.f
const F32 AUTOPILOT_MAX_TIME_NO_PROGRESS = 1.5f
const LLVector3d FACE_EDIT_CAMERA_OFFSET (0.4f,-0.05f, 0.07f)
const F32 MIN_ZOOM_FRACTION = 0.25f
const F32 INITIAL_ZOOM_FRACTION = 1.f
const F32 MAX_ZOOM_FRACTION = 8.f
const F32 METERS_PER_WHEEL_CLICK = 1.f
const F32 MAX_TIME_DELTA = 1.f
const F32 CAMERA_ZOOM_HALF_LIFE = 0.07f
const F32 FOV_ZOOM_HALF_LIFE = 0.07f
const F32 CAMERA_FOCUS_HALF_LIFE = 0.f
const F32 CAMERA_LAG_HALF_LIFE = 0.25f
const F32 MIN_CAMERA_LAG = 0.5f
const F32 MAX_CAMERA_LAG = 5.f
const F32 CAMERA_COLLIDE_EPSILON = 0.1f
const F32 MIN_CAMERA_DISTANCE = 0.1f
const F32 AVATAR_ZOOM_MIN_X_FACTOR = 0.55f
const F32 AVATAR_ZOOM_MIN_Y_FACTOR = 0.7f
const F32 AVATAR_ZOOM_MIN_Z_FACTOR = 1.15f
const F32 MAX_CAMERA_DISTANCE_FROM_AGENT = 50.f
const F32 HEAD_BUFFER_SIZE = 0.3f
const F32 CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP = 0.2f
const F32 LAND_MIN_ZOOM = 0.15f
const F32 AVATAR_MIN_ZOOM = 0.5f
const F32 OBJECT_MIN_ZOOM = 0.02f
const F32 APPEARANCE_MIN_ZOOM = 0.39f
const F32 APPEARANCE_MAX_ZOOM = 8.f
const F32 MIN_FIDGET_TIME = 8.f
const F32 MAX_FIDGET_TIME = 20.f
const S32 MAX_NUM_CHAT_POSITIONS = 10
const F32 GROUND_TO_AIR_CAMERA_TRANSITION_TIME = 0.5f
const F32 GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME = 0.5f
const F32 MAX_VELOCITY_AUTO_LAND_SQUARED = 4.f * 4.f
const F32 MAX_FOCUS_OFFSET = 20.f
const F32 OBJECT_EXTENTS_PADDING = 0.5f
const F32 MIN_RADIUS_ALPHA_SIZZLE = 0.5f
const F64 CHAT_AGE_FAST_RATE = 3.0
const S32 MAX_WEARABLES_PER_LAYERSET = 7
const EWearableType WEARABLE_BAKE_TEXTURE_MAP [BAKED_TEXTURE_COUNT][MAX_WEARABLES_PER_LAYERSET]
const LLUUID BAKED_TEXTURE_HASH [BAKED_TEXTURE_COUNT]
const F32 SIT_POINT_EXTENTS = 0.2f
LLHTTPRegistration< LLAgentGroupDataUpdateViewerNodegHTTPRegistrationAgentGroupDataUpdateViewerNode ("/message/AgentGroupDataUpdate")


Detailed Description

LLAgent class implementation.

LicenseInfo
firstyear=2001&license=viewergpl

Copyright (c) 2001-2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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 llagent.cpp.


Function Documentation

const LLVector3d FACE_EDIT_TARGET_OFFSET ( 0.  f,
0.  f,
0.  05f 
)

static const LLFloaterView::skip_list_t& get_skip_list (  )  [static]

Definition at line 2747 of file llagent.cpp.

References gFloaterMap.

Referenced by LLAgent::endAnimationUpdateUI().

std::ostream& operator<< ( std::ostream &  s,
const LLAgent agent 
)

Definition at line 2572 of file llagent.cpp.

References LLAgent::mFrameAgent.

void update_group_floaters ( const LLUUID group_id  ) 

Definition at line 5179 of file llagent.cpp.

References LLObservable::fireEvent(), gAgent, LLAgent::getID(), LLFloaterAvatarInfo::getInstance(), gIMMgr, LLIMMgr::refresh(), LLFloaterGroupInfo::refreshGroup(), and LLFloaterAvatarInfo::resetGroupList().

Referenced by LLAgentGroupDataUpdateViewerNode::post(), LLAgent::processAgentDataUpdate(), and LLAgent::processAgentGroupDataUpdate().


Variable Documentation

const F32 APPEARANCE_MAX_ZOOM = 8.f

Definition at line 186 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal(), LLAgent::cameraOrbitIn(), LLAgent::cameraZoomIn(), LLAgent::getCameraZoomFraction(), and LLAgent::setCameraZoomFraction().

const F32 APPEARANCE_MIN_ZOOM = 0.39f

Definition at line 185 of file llagent.cpp.

Referenced by LLAgent::cameraOrbitIn(), LLAgent::cameraZoomIn(), LLAgent::getCameraZoomFraction(), and LLAgent::setCameraZoomFraction().

const F32 AUTOPILOT_HEADING_HALF_ERROR = 10.f * DEG_TO_RAD

Definition at line 143 of file llagent.cpp.

const F32 AUTOPILOT_HEIGHT_ADJUST_DISTANCE = 8.f

Definition at line 146 of file llagent.cpp.

Referenced by LLAgent::autoPilot().

const F32 AUTOPILOT_MAX_SLEW_RATE = 1.f * DEG_TO_RAD

Definition at line 144 of file llagent.cpp.

const F32 AUTOPILOT_MAX_TIME_NO_PROGRESS = 1.5f

Definition at line 148 of file llagent.cpp.

Referenced by LLAgent::autoPilot().

const F32 AUTOPILOT_MIN_TARGET_HEIGHT_OFF_GROUND = 1.f

Definition at line 147 of file llagent.cpp.

Referenced by LLAgent::autoPilot().

const F32 AUTOPILOT_STOP_DISTANCE = 2.f

Definition at line 145 of file llagent.cpp.

const F32 AVATAR_MIN_ZOOM = 0.5f

Definition at line 182 of file llagent.cpp.

Referenced by LLAgent::cameraOrbitIn(), LLAgent::getCameraZoomFraction(), and LLAgent::setCameraZoomFraction().

const F32 AVATAR_ZOOM_MIN_X_FACTOR = 0.55f

Definition at line 172 of file llagent.cpp.

Referenced by LLAgent::calcCameraMinDistance().

const F32 AVATAR_ZOOM_MIN_Y_FACTOR = 0.7f

Definition at line 173 of file llagent.cpp.

Referenced by LLAgent::calcCameraMinDistance().

const F32 AVATAR_ZOOM_MIN_Z_FACTOR = 1.15f

Definition at line 174 of file llagent.cpp.

Referenced by LLAgent::calcCameraMinDistance().

const LLUUID BAKED_TEXTURE_HASH[BAKED_TEXTURE_COUNT]

Initial value:

 
{
        LLUUID("18ded8d6-bcfc-e415-8539-944c0f5ea7a6"),
        LLUUID("338c29e3-3024-4dbb-998d-7c04cf4fa88f"),
        LLUUID("91b4a2c7-1b1a-ba16-9a16-1f8f8dcc1c3f"),
        LLUUID("b2cf28af-b840-1071-3c6a-78085d8128b5"),

}

Definition at line 217 of file llagent.cpp.

Referenced by LLAgent::queryWearableCache(), and LLAgent::sendAgentSetAppearance().

const F32 CAMERA_COLLIDE_EPSILON = 0.1f

Definition at line 170 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal().

const F32 CAMERA_FOCUS_HALF_LIFE = 0.f

Definition at line 165 of file llagent.cpp.

Referenced by LLAgent::updateCamera().

const F32 CAMERA_LAG_HALF_LIFE = 0.25f

Definition at line 166 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal().

const F32 CAMERA_ZOOM_HALF_LIFE = 0.07f

Definition at line 162 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal().

const F64 CHAT_AGE_FAST_RATE = 3.0

Definition at line 204 of file llagent.cpp.

Referenced by LLAgent::ageChat().

const F32 CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP = 0.2f

Definition at line 179 of file llagent.cpp.

Referenced by LLAgent::changeCameraToCustomizeAvatar().

const LLVector3d FACE_EDIT_CAMERA_OFFSET(0.4f,-0.05f, 0.07f)

const F32 FOV_ZOOM_HALF_LIFE = 0.07f

Definition at line 163 of file llagent.cpp.

Referenced by LLAgent::updateCamera().

F32 gFrameDTClamped

Definition at line 3404 of file viewer.cpp.

Referenced by LLAgent::ageChat(), and LLViewerObject::processUpdateMessage().

LLHTTPRegistration<LLAgentGroupDataUpdateViewerNode > gHTTPRegistrationAgentGroupDataUpdateViewerNode("/message/AgentGroupDataUpdate")

U8 gLastPickAlpha

Definition at line 223 of file llviewerwindow.cpp.

Referenced by LLViewerWindow::performPick().

LLMenuBarGL* gMenuBarView

Definition at line 243 of file llviewermenu.cpp.

Referenced by cleanup_menus(), LLAgent::endAnimationUpdateUI(), handle_export_menus_to_xml(), LLViewerWindow::handleFocusLost(), LLViewerWindow::handleKey(), LLViewerWindow::handleMouseDown(), LLViewerWindow::handleRightMouseDown(), LLViewerWindow::handleUnicodeChar(), LLViewerMenuHolderGL::hideMenus(), init_menus(), LLViewerWindow::initWorldUI(), LLStatusBar::refresh(), set_god_level(), LLViewerWindow::setNormalControlsVisible(), and show_debug_menus().

const F32 GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME = 0.5f

Definition at line 194 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal().

const F32 GROUND_TO_AIR_CAMERA_TRANSITION_TIME = 0.5f

Definition at line 193 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal().

const F32 HEAD_BUFFER_SIZE = 0.3f

Definition at line 178 of file llagent.cpp.

Referenced by LLAgent::updateCamera().

const F32 INITIAL_ZOOM_FRACTION = 1.f

Definition at line 156 of file llagent.cpp.

Referenced by LLAgent::changeCameraToThirdPerson().

const F32 LAND_MIN_ZOOM = 0.15f

Definition at line 181 of file llagent.cpp.

Referenced by LLAgent::cameraOrbitIn(), LLAgent::cameraZoomIn(), LLAgent::getCameraZoomFraction(), and LLAgent::setCameraZoomFraction().

const F32 MAX_CAMERA_DISTANCE_FROM_AGENT = 50.f

Definition at line 176 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal(), LLAgent::getCameraZoomFraction(), LLAgent::LLAgent(), and LLAgent::setCameraZoomFraction().

const F32 MAX_CAMERA_LAG = 5.f

Definition at line 168 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal().

const F32 MAX_FIDGET_TIME = 20.f

Definition at line 190 of file llagent.cpp.

Referenced by LLAgent::fidget().

const F32 MAX_FOCUS_OFFSET = 20.f

Definition at line 198 of file llagent.cpp.

const F32 MAX_HEADING_HALF_ERROR = 0.2f

Definition at line 138 of file llagent.cpp.

const S32 MAX_NUM_CHAT_POSITIONS = 10

Definition at line 192 of file llagent.cpp.

const F32 MAX_TIME_DELTA = 1.f

Definition at line 160 of file llagent.cpp.

const F32 MAX_VELOCITY_AUTO_LAND_SQUARED = 4.f * 4.f

Definition at line 196 of file llagent.cpp.

Referenced by LLAgent::propagate().

const F32 MAX_WANDER_TIME = 20.f

Definition at line 137 of file llagent.cpp.

const S32 MAX_WEARABLES_PER_LAYERSET = 7

Definition at line 206 of file llagent.cpp.

Referenced by LLAgent::queryWearableCache(), and LLAgent::sendAgentSetAppearance().

const F32 MAX_ZOOM_FRACTION = 8.f

Definition at line 157 of file llagent.cpp.

Referenced by LLAgent::cameraOrbitIn(), LLAgent::getCameraZoomFraction(), and LLAgent::setCameraZoomFraction().

const F32 METERS_PER_WHEEL_CLICK = 1.f

Definition at line 158 of file llagent.cpp.

const F32 MIN_CAMERA_DISTANCE = 0.1f

Definition at line 171 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal(), and LLAgent::changeCameraToThirdPerson().

const F32 MIN_CAMERA_LAG = 0.5f

Definition at line 167 of file llagent.cpp.

Referenced by LLAgent::calcCameraPositionTargetGlobal().

const F32 MIN_FIDGET_TIME = 8.f

Definition at line 189 of file llagent.cpp.

Referenced by LLAgent::fidget().

const F32 MIN_RADIUS_ALPHA_SIZZLE = 0.5f

Definition at line 202 of file llagent.cpp.

Referenced by LLAgent::updateCamera().

const F32 MIN_ZOOM_FRACTION = 0.25f

Definition at line 155 of file llagent.cpp.

Referenced by LLAgent::cameraOrbitIn(), LLAgent::getCameraZoomFraction(), and LLAgent::setCameraZoomFraction().

const F32 OBJECT_EXTENTS_PADDING = 0.5f

Definition at line 200 of file llagent.cpp.

Referenced by LLAgent::calcCameraMinDistance().

const F32 OBJECT_MIN_ZOOM = 0.02f

Definition at line 183 of file llagent.cpp.

Referenced by LLAgent::cameraOrbitIn(), LLAgent::cameraZoomIn(), LLAgent::getCameraZoomFraction(), and LLAgent::setCameraZoomFraction().

const F32 SIT_POINT_EXTENTS = 0.2f

Definition at line 4650 of file llagent.cpp.

const F32 WANDER_MAX_SLEW_RATE = 2.f * DEG_TO_RAD

Definition at line 139 of file llagent.cpp.

const F32 WANDER_TARGET_MIN_DISTANCE = 10.f

Definition at line 140 of file llagent.cpp.

const EWearableType WEARABLE_BAKE_TEXTURE_MAP[BAKED_TEXTURE_COUNT][MAX_WEARABLES_PER_LAYERSET]

Initial value:

 
{
        { WT_SHAPE,     WT_SKIN,        WT_HAIR,        WT_INVALID,     WT_INVALID,     WT_INVALID,             WT_INVALID    },        
        { WT_SHAPE, WT_SKIN,    WT_SHIRT,       WT_JACKET,      WT_GLOVES,      WT_UNDERSHIRT,  WT_INVALID        },    
        { WT_SHAPE, WT_SKIN,    WT_PANTS,       WT_SHOES,       WT_SOCKS,       WT_JACKET,              WT_UNDERPANTS },        
        { WT_EYES,      WT_INVALID,     WT_INVALID,     WT_INVALID,     WT_INVALID,     WT_INVALID,             WT_INVALID    },        
        { WT_SKIRT,     WT_INVALID,     WT_INVALID,     WT_INVALID,     WT_INVALID,     WT_INVALID,             WT_INVALID    }         
}

Definition at line 208 of file llagent.cpp.

Referenced by LLAgent::queryWearableCache(), and LLAgent::sendAgentSetAppearance().


Generated on Thu Jul 1 06:10:04 2010 for Second Life Viewer by  doxygen 1.4.7