llvoavatar.cpp File Reference

Implementation of LLVOAvatar class which is a derivation fo LLViewerObject. More...

#include "llviewerprecompiledheaders.h"
#include <algorithm>
#include <vector>
#include "llstl.h"
#include "llvoavatar.h"
#include "llglimmediate.h"
#include "audioengine.h"
#include "imageids.h"
#include "indra_constants.h"
#include "llchat.h"
#include "llfontgl.h"
#include "llprimitive.h"
#include "lltextureentry.h"
#include "message.h"
#include "noise.h"
#include "sound_ids.h"
#include "lltimer.h"
#include "timing.h"
#include "llagent.h"
#include "llviewercontrol.h"
#include "llcriticaldamp.h"
#include "lldir.h"
#include "lldrawable.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolalpha.h"
#include "lldrawpoolbump.h"
#include "lldriverparam.h"
#include "lleditingmotion.h"
#include "llemote.h"
#include "llface.h"
#include "llfasttimer.h"
#include "llfirstuse.h"
#include "llfloatercustomize.h"
#include "llfloatertools.h"
#include "llgldbg.h"
#include "llhandmotion.h"
#include "llheadrotmotion.h"
#include "llhudeffectbeam.h"
#include "llhudeffectlookat.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
#include "llhudtext.h"
#include "llinventorymodel.h"
#include "llinventoryview.h"
#include "llkeyframefallmotion.h"
#include "llkeyframemotion.h"
#include "llkeyframemotionparam.h"
#include "llkeyframestandmotion.h"
#include "llkeyframewalkmotion.h"
#include "llmenugl.h"
#include "llmutelist.h"
#include "llnetmap.h"
#include "llnotify.h"
#include "llquantize.h"
#include "llregionhandle.h"
#include "llresmgr.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "llsprite.h"
#include "llstatusbar.h"
#include "lltargetingmotion.h"
#include "lltexlayer.h"
#include "lltoolgrab.h"
#include "lltoolmgr.h"
#include "lltoolmorph.h"
#include "llviewercamera.h"
#include "llviewerimagelist.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewerwindow.h"
#include "llvosky.h"
#include "llvovolume.h"
#include "llwearable.h"
#include "llwearablelist.h"
#include "llworld.h"
#include "pipeline.h"
#include "llspatialpartition.h"
#include "llglslshader.h"
#include "llappviewer.h"
#include "llanimstatelabels.h"
#include "llgesturemgr.h"
#include "llvoicevisualizer.h"
#include "llvoiceclient.h"

Go to the source code of this file.

Classes

struct  LLAvatarTexData
struct  LLTextureMaskData
class  LLBodyNoiseMotion
class  LLBreatheMotionRot
class  LLPelvisFixMotion

Defines

#define DELTA_TIME_MIN   0.01f
#define DELTA_TIME_MAX   0.2f
#define PELVIS_ROT_THRESHOLD_SLOW   60.0f
#define PELVIS_ROT_THRESHOLD_FAST   2.0f
#define TORSO_NOISE_AMOUNT   1.f
#define TORSO_NOISE_SPEED   0.2f
#define PELVIS_NOISE_FACTOR   0.5f
#define AUDIO_STEP_PRI   0xC0000000
#define AUDIO_STEP_LO_SPEED   0.01f
#define AUDIO_STEP_HI_SPEED   3.0f
#define AUDIO_STEP_LO_GAIN   0.15f
#define AUDIO_STEP_HI_GAIN   0.15f
#define AVATAR_HEADER   "Linden Avatar 1.0"
#define AVATAR_SECTION   "[avatar]"
#define AVATAR_DEFAULT_CHAR   "avatar"
#define MIN_REQUIRED_PIXEL_AREA_BODY_NOISE   (10000.f)
#define MIN_REQUIRED_PIXEL_AREA_BREATHE   (10000.f)
#define MIN_REQUIRED_PIXEL_AREA_PELVIS_FIX   (40.f)

Functions

static F32 calc_bouncy_animation (F32 x)
U32 calc_shame (LLVOVolume *volume, std::set< LLUUID > &textures)

Variables

BOOL gDebugAvatarRotation = FALSE
const F32 MIN_PIXEL_AREA_FOR_COMPOSITE = 200.f
F32 SHADOW_OFFSET_AMT = 0.03f
const F32 PELVIS_LAG_FLYING = 0.22f
const F32 PELVIS_LAG_WALKING = 0.4f
const F32 PELVIS_LAG_MOUSELOOK = 0.15f
const F32 MOUSELOOK_PELVIS_FOLLOW_FACTOR = 0.5f
const F32 PELVIS_LAG_WHEN_FOLLOW_CAM_IS_ON = 0.0001f
const F32 MIN_SPEED_PELVIS_FOLLOW = 0.1f
const F32 BREATHE_ROT_MOTION_STRENGTH = 0.05f
const F32 BREATHE_SCALE_MOTION_STRENGTH = 0.005f
const F32 DAMPED_MOTION_TIME_SCALE = 0.15f
const F32 LOOKAT_CAMERA_DIST_SQUARED = 25.f
const F32 MIN_SHADOW_HEIGHT = 0.f
const F32 MAX_SHADOW_HEIGHT = 0.3f
const S32 LOCTEX_IMAGE_SIZE_SELF = 512
const S32 LOCTEX_IMAGE_AREA_SELF = LOCTEX_IMAGE_SIZE_SELF * LOCTEX_IMAGE_SIZE_SELF
const S32 LOCTEX_IMAGE_SIZE_OTHER = LOCTEX_IMAGE_SIZE_SELF / 4
const S32 LOCTEX_IMAGE_AREA_OTHER = LOCTEX_IMAGE_SIZE_OTHER * LOCTEX_IMAGE_SIZE_OTHER
const F32 HEAD_MOVEMENT_AVG_TIME = 0.9f
const S32 MORPH_MASK_REQUESTED_DISCARD = 0
const S32 MIN_PIXEL_AREA_BUMP = 500
const S32 SWITCH_TO_BAKED_DISCARD = 5
const F32 FOOT_COLLIDE_FUDGE = 0.04f
const F32 HOVER_EFFECT_MAX_SPEED = 3.f
const F32 HOVER_EFFECT_STRENGTH = 0.f
F32 UNDERWATER_EFFECT_STRENGTH = 0.1f
const F32 UNDERWATER_FREQUENCY_DAMP = 0.33f
const F32 APPEARANCE_MORPH_TIME = 0.65f
const F32 CAMERA_SHAKE_ACCEL_THRESHOLD_SQUARED = 5.f * 5.f
const F32 TIME_BEFORE_MESH_CLEANUP = 5.f
const S32 AVATAR_RELEASE_THRESHOLD = 10
const F32 FOOT_GROUND_COLLISION_TOLERANCE = 0.25f
const F32 AVATAR_LOD_TWEAK_RANGE = 0.7f
const S32 MAX_LOD_CHANGES_PER_FRAME = 2
const S32 MAX_BUBBLE_CHAT_LENGTH = 1023
const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12
const F32 CHAT_FADE_TIME = 8.0
const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f
const S32 MAX_BUBBLES = 7


Detailed Description

Implementation of LLVOAvatar class which is a derivation fo LLViewerObject.

LicenseInfo
firstyear=2001&license=viewergpl

Copyright (c) 2001-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 llvoavatar.cpp.


Define Documentation

#define AUDIO_STEP_HI_GAIN   0.15f

Definition at line 176 of file llvoavatar.cpp.

#define AUDIO_STEP_HI_SPEED   3.0f

Definition at line 174 of file llvoavatar.cpp.

#define AUDIO_STEP_LO_GAIN   0.15f

Definition at line 175 of file llvoavatar.cpp.

#define AUDIO_STEP_LO_SPEED   0.01f

Definition at line 173 of file llvoavatar.cpp.

#define AUDIO_STEP_PRI   0xC0000000

Definition at line 172 of file llvoavatar.cpp.

#define AVATAR_DEFAULT_CHAR   "avatar"

Definition at line 185 of file llvoavatar.cpp.

Referenced by LLVOAvatar::initClass(), and LLVOAvatar::LLVOAvatar().

#define AVATAR_HEADER   "Linden Avatar 1.0"

Definition at line 182 of file llvoavatar.cpp.

#define AVATAR_SECTION   "[avatar]"

Definition at line 183 of file llvoavatar.cpp.

#define DELTA_TIME_MAX   0.2f

Definition at line 146 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

#define DELTA_TIME_MIN   0.01f

Definition at line 145 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

#define MIN_REQUIRED_PIXEL_AREA_BODY_NOISE   (10000.f)

Definition at line 190 of file llvoavatar.cpp.

Referenced by LLBodyNoiseMotion::getMinPixelArea().

#define MIN_REQUIRED_PIXEL_AREA_BREATHE   (10000.f)

Definition at line 191 of file llvoavatar.cpp.

Referenced by LLBreatheMotionRot::getMinPixelArea().

#define MIN_REQUIRED_PIXEL_AREA_PELVIS_FIX   (40.f)

Definition at line 192 of file llvoavatar.cpp.

Referenced by LLPelvisFixMotion::getMinPixelArea().

#define PELVIS_NOISE_FACTOR   0.5f

Definition at line 170 of file llvoavatar.cpp.

#define PELVIS_ROT_THRESHOLD_FAST   2.0f

Definition at line 158 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

#define PELVIS_ROT_THRESHOLD_SLOW   60.0f

Definition at line 157 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

#define TORSO_NOISE_AMOUNT   1.f

Definition at line 163 of file llvoavatar.cpp.

Referenced by LLBodyNoiseMotion::onUpdate().

#define TORSO_NOISE_SPEED   0.2f

Definition at line 164 of file llvoavatar.cpp.

Referenced by LLBodyNoiseMotion::onUpdate().


Function Documentation

static F32 calc_bouncy_animation ( F32  x  )  [static]

Definition at line 242 of file llvoavatar.cpp.

References cosf, F_PI, and F_PI_BY_TWO.

U32 calc_shame ( LLVOVolume volume,
std::set< LLUUID > &  textures 
)


Variable Documentation

const F32 APPEARANCE_MORPH_TIME = 0.65f

Definition at line 214 of file llvoavatar.cpp.

Referenced by LLVOAvatar::idleUpdate().

Definition at line 219 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateJointLODs().

Definition at line 217 of file llvoavatar.cpp.

Referenced by LLVOAvatar::releaseMeshData().

Definition at line 166 of file llvoavatar.cpp.

Referenced by LLBreatheMotionRot::onUpdate().

Definition at line 168 of file llvoavatar.cpp.

Definition at line 224 of file llvoavatar.cpp.

Referenced by LLVOAvatar::idleUpdate().

Definition at line 215 of file llvoavatar.cpp.

const F32 CHAT_FADE_TIME = 8.0

Definition at line 223 of file llvoavatar.cpp.

Referenced by LLVOAvatar::idleUpdate().

Definition at line 178 of file llvoavatar.cpp.

const F32 FOOT_COLLIDE_FUDGE = 0.04f

Definition at line 208 of file llvoavatar.cpp.

Referenced by LLVOAvatar::renderSkinned().

Definition at line 218 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

Definition at line 133 of file llvoavatar.cpp.

Referenced by init_debug_avatar_menu(), and LLVOAvatar::updateCharacter().

Definition at line 199 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateHeadOffset().

Definition at line 210 of file llvoavatar.cpp.

Referenced by LLVOAvatar::idleUpdate().

Definition at line 211 of file llvoavatar.cpp.

Referenced by LLVOAvatar::idleUpdate().

Definition at line 197 of file llvoavatar.cpp.

Referenced by LLVOAvatar::addLocalTextureStats().

Definition at line 195 of file llvoavatar.cpp.

Referenced by LLVOAvatar::addLocalTextureStats().

Definition at line 196 of file llvoavatar.cpp.

Definition at line 194 of file llvoavatar.cpp.

Referenced by LLVOAvatar::setPixelAreaAndAngle().

Definition at line 180 of file llvoavatar.cpp.

Definition at line 221 of file llvoavatar.cpp.

Referenced by LLVOAvatar::addChat().

Definition at line 222 of file llvoavatar.cpp.

Referenced by LLVOAvatar::addChat(), and LLVOAvatar::idleUpdate().

const S32 MAX_BUBBLES = 7

Definition at line 225 of file llvoavatar.cpp.

Definition at line 220 of file llvoavatar.cpp.

const F32 MAX_SHADOW_HEIGHT = 0.3f

Definition at line 188 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateShadowFaces().

const S32 MIN_PIXEL_AREA_BUMP = 500

Definition at line 202 of file llvoavatar.cpp.

const F32 MIN_SHADOW_HEIGHT = 0.f

Definition at line 187 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateShadowFaces().

Definition at line 161 of file llvoavatar.cpp.

Definition at line 153 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

const F32 PELVIS_LAG_FLYING = 0.22f

Definition at line 148 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

const F32 PELVIS_LAG_MOUSELOOK = 0.15f

Definition at line 152 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

const F32 PELVIS_LAG_WALKING = 0.4f

Definition at line 150 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateCharacter().

Definition at line 155 of file llvoavatar.cpp.

Definition at line 143 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateShadowFaces().

Definition at line 206 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateMeshTextures().

Definition at line 216 of file llvoavatar.cpp.

Referenced by LLVOAvatar::updateVisibility().

Definition at line 212 of file llvoavatar.cpp.

Referenced by LLVOAvatar::idleUpdate().

Definition at line 213 of file llvoavatar.cpp.

Referenced by LLVOAvatar::idleUpdate().


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