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.h108
1 files changed, 50 insertions, 58 deletions
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 0934f5df36..8da4c226ed 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -1,27 +1,33 @@
/**
* @file llvoavatar.h
- * @brief Declaration of LLVOAvatar class which is a derivation of
+ * @brief Declaration of LLVOAvatar class which is a derivation fo
* LLViewerObject
*
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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.
+ * 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
*
- * 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.
+ * 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
*
- * 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
+ * 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.
*
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 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.
* $/LicenseInfo$
*/
@@ -65,10 +71,9 @@ class LLTexGlobalColor;
class LLVOAvatarBoneInfo;
class LLVOAvatarSkeletonInfo;
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//------------------------------------------------------------------------
// LLVOAvatar
-//
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//------------------------------------------------------------------------
class LLVOAvatar :
public LLViewerObject,
public LLCharacter
@@ -133,13 +138,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
@@ -152,14 +157,12 @@ 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; }
@@ -217,8 +220,8 @@ public:
public:
static S32 sRenderName;
static BOOL sRenderGroupTitles;
- static U32 sMaxVisible; //(affected by control "RenderAvatarMaxVisible")
- static F32 sRenderDistance; //distance at which avatars will render.
+ static S32 sMaxVisible;
+ static F32 sRenderDistance; //distance at which avatars will render (affected by control "RenderAvatarMaxVisible")
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
@@ -243,7 +246,6 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
- bool visualParamWeightsAreDefault();
protected:
virtual BOOL getIsCloud();
BOOL updateIsFullyLoaded();
@@ -257,8 +259,7 @@ private:
S32 mFullyLoadedFrameCounter;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
-protected:
- LLFrameTimer mInvisibleTimer;
+ LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
/** State
** **
@@ -461,9 +462,7 @@ public:
//--------------------------------------------------------------------
public:
virtual BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
- virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
- virtual BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const;
-
+ BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex index) const;
protected:
BOOL isFullyBaked();
static BOOL areAllNearbyInstancesBaked(S32& grey_avatars);
@@ -495,8 +494,7 @@ protected:
};
typedef std::vector<BakedTextureData> bakedtexturedata_vec_t;
bakedtexturedata_vec_t mBakedTextureDatas;
- LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
- BOOL mLoadedCallbacksPaused;
+
//--------------------------------------------------------------------
// Local Textures
//--------------------------------------------------------------------
@@ -516,7 +514,7 @@ private:
virtual const LLTextureEntry* getTexEntry(const U8 te_num) const;
virtual void setTexEntry(const U8 index, const LLTextureEntry &te);
- void checkTextureLoading() ;
+
//--------------------------------------------------------------------
// Layers
//--------------------------------------------------------------------
@@ -605,9 +603,8 @@ public:
// Appearance morphing
//--------------------------------------------------------------------
public:
- BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; }
-private:
BOOL mAppearanceAnimating;
+private:
LLFrameTimer mAppearanceMorphTimer;
F32 mLastAppearanceBlendTime;
@@ -649,7 +646,7 @@ public:
**/
public:
- virtual BOOL isWearingWearableType(LLWearableType::EType type ) const;
+ virtual BOOL isWearingWearableType(EWearableType type ) const;
//--------------------------------------------------------------------
// Attachments
@@ -863,7 +860,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
- LLPointer<LLVoiceVisualizer> mVoiceVisualizer;
+ LLVoiceVisualizer* mVoiceVisualizer;
int mCurrentGesticulationLevel;
//--------------------------------------------------------------------
@@ -895,9 +892,6 @@ private:
** DIAGNOSTICS
**/
- //--------------------------------------------------------------------
- // General
- //--------------------------------------------------------------------
public:
static void dumpArchetypeXML(void*);
static void dumpBakedStatus();
@@ -917,16 +911,6 @@ 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
** **
*******************************************************************************/
@@ -1043,7 +1027,15 @@ protected: // Shared with LLVOAvatarSelf
*******************************************************************************/
}; // LLVOAvatar
-extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
-extern const F32 SELF_ADDITIONAL_PRI;
+
+//------------------------------------------------------------------------
+// Inlines
+//------------------------------------------------------------------------
+inline BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex te) const
+{
+ return ((isTextureDefined(te) || isSelf())
+ && (getTEImage(te)->getID() != IMG_INVISIBLE
+ || LLDrawPoolAlpha::sShowDebugAlpha));
+}
#endif // LL_VO_AVATAR_H