summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.h')
-rw-r--r--indra/newview/llvoavatar.h111
1 files changed, 61 insertions, 50 deletions
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index d5485413f4..0934f5df36 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -1,33 +1,27 @@
/**
* @file llvoavatar.h
- * @brief Declaration of LLVOAvatar class which is a derivation fo
+ * @brief Declaration of LLVOAvatar class which is a derivation of
* LLViewerObject
*
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
* 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
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * 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
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * 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.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -71,9 +65,10 @@ class LLTexGlobalColor;
class LLVOAvatarBoneInfo;
class LLVOAvatarSkeletonInfo;
-//------------------------------------------------------------------------
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// LLVOAvatar
-//------------------------------------------------------------------------
+//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLVOAvatar :
public LLViewerObject,
public LLCharacter
@@ -138,13 +133,13 @@ public:
virtual void updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax);
virtual void getSpatialExtents(LLVector3& newMin, LLVector3& newMax);
virtual BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
- S32 face = -1, // which face to check, -1 = ALL_SIDES
- BOOL pick_transparent = FALSE,
- S32* face_hit = NULL, // which face was hit
- LLVector3* intersection = NULL, // return the intersection point
- LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
- LLVector3* normal = NULL, // return the surface normal at the intersection point
- LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point
+ S32 face = -1, // which face to check, -1 = ALL_SIDES
+ BOOL pick_transparent = FALSE,
+ S32* face_hit = NULL, // which face was hit
+ LLVector3* intersection = NULL, // return the intersection point
+ LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
+ LLVector3* normal = NULL, // return the surface normal at the intersection point
+ LLVector3* bi_normal = NULL); // return the surface bi-normal at the intersection point
//--------------------------------------------------------------------
// LLCharacter interface and related
@@ -157,12 +152,14 @@ public:
virtual LLJoint* getCharacterJoint(U32 num);
virtual BOOL allocateCharacterJoints(U32 num);
+ virtual LLUUID remapMotionID(const LLUUID& id);
virtual BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f);
virtual BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE);
virtual void stopMotionFromSource(const LLUUID& source_id);
virtual void requestStopMotion(LLMotion* motion);
LLMotion* findMotion(const LLUUID& id) const;
void startDefaultMotions();
+ void dumpAnimationState();
virtual LLJoint* getJoint(const std::string &name);
virtual LLJoint* getRootJoint() { return &mRoot; }
@@ -220,8 +217,8 @@ public:
public:
static S32 sRenderName;
static BOOL sRenderGroupTitles;
- static S32 sMaxVisible;
- static F32 sRenderDistance; //distance at which avatars will render (affected by control "RenderAvatarMaxVisible")
+ static U32 sMaxVisible; //(affected by control "RenderAvatarMaxVisible")
+ static F32 sRenderDistance; //distance at which avatars will render.
static BOOL sShowAnimationDebug; // show animation debug info
static BOOL sUseImpostors; //use impostors for far away avatars
static BOOL sShowFootPlane; // show foot collision plane reported by server
@@ -246,8 +243,10 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
+ bool visualParamWeightsAreDefault();
protected:
- virtual BOOL updateIsFullyLoaded();
+ virtual BOOL getIsCloud();
+ BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
void updateRuthTimer(bool loading);
F32 calcMorphAmount();
@@ -258,6 +257,8 @@ private:
S32 mFullyLoadedFrameCounter;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
+protected:
+ LLFrameTimer mInvisibleTimer;
/** State
** **
@@ -460,7 +461,9 @@ public:
//--------------------------------------------------------------------
public:
virtual BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
- BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex index) const;
+ virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
+ virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const;
+
protected:
BOOL isFullyBaked();
static BOOL areAllNearbyInstancesBaked(S32& grey_avatars);
@@ -492,7 +495,8 @@ protected:
};
typedef std::vector<BakedTextureData> bakedtexturedata_vec_t;
bakedtexturedata_vec_t mBakedTextureDatas;
-
+ LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
+ BOOL mLoadedCallbacksPaused;
//--------------------------------------------------------------------
// Local Textures
//--------------------------------------------------------------------
@@ -512,7 +516,7 @@ private:
virtual const LLTextureEntry* getTexEntry(const U8 te_num) const;
virtual void setTexEntry(const U8 index, const LLTextureEntry &te);
-
+ void checkTextureLoading() ;
//--------------------------------------------------------------------
// Layers
//--------------------------------------------------------------------
@@ -601,8 +605,9 @@ public:
// Appearance morphing
//--------------------------------------------------------------------
public:
- BOOL mAppearanceAnimating;
+ BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; }
private:
+ BOOL mAppearanceAnimating;
LLFrameTimer mAppearanceMorphTimer;
F32 mLastAppearanceBlendTime;
@@ -644,7 +649,7 @@ public:
**/
public:
- virtual BOOL isWearingWearableType(EWearableType type ) const;
+ virtual BOOL isWearingWearableType(LLWearableType::EType type ) const;
//--------------------------------------------------------------------
// Attachments
@@ -828,6 +833,7 @@ private:
BOOL mNameBusy;
BOOL mNameMute;
BOOL mNameAppearance;
+ BOOL mNameCloud;
BOOL mRenderGroupTitles;
//--------------------------------------------------------------------
@@ -857,7 +863,7 @@ private:
public:
// Responsible for detecting the user's voice signal (and when the
// user speaks, it puts a voice symbol over the avatar's head) and gesticulations
- LLVoiceVisualizer* mVoiceVisualizer;
+ LLPointer<LLVoiceVisualizer> mVoiceVisualizer;
int mCurrentGesticulationLevel;
//--------------------------------------------------------------------
@@ -889,6 +895,9 @@ private:
** DIAGNOSTICS
**/
+ //--------------------------------------------------------------------
+ // General
+ //--------------------------------------------------------------------
public:
static void dumpArchetypeXML(void*);
static void dumpBakedStatus();
@@ -908,6 +917,16 @@ private:
F32 mAdjustedPixelArea;
std::string mDebugText;
+
+ //--------------------------------------------------------------------
+ // Avatar Rez Metrics
+ //--------------------------------------------------------------------
+public:
+ F32 debugGetExistenceTimeElapsedF32() const { return mDebugExistenceTimer.getElapsedTimeF32(); }
+protected:
+ LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
+ LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
+
/** Diagnostics
** **
*******************************************************************************/
@@ -1024,15 +1043,7 @@ protected: // Shared with LLVOAvatarSelf
*******************************************************************************/
}; // LLVOAvatar
-
-//------------------------------------------------------------------------
-// Inlines
-//------------------------------------------------------------------------
-inline BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex te) const
-{
- return ((isTextureDefined(te) || isSelf())
- && (getTEImage(te)->getID() != IMG_INVISIBLE
- || LLDrawPoolAlpha::sShowDebugAlpha));
-}
+extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
+extern const F32 SELF_ADDITIONAL_PRI;
#endif // LL_VO_AVATAR_H