summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.h')
-rw-r--r--indra/newview/llviewerobject.h54
1 files changed, 48 insertions, 6 deletions
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index d61832c2ad..d6c8b76147 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -42,11 +42,13 @@
#include "v3math.h"
#include "llvertexbuffer.h"
#include "llbbox.h"
+#include "llrigginginfo.h"
class LLAgent; // TODO: Get rid of this.
class LLAudioSource;
class LLAudioSourceVO;
class LLColor4;
+class LLControlAvatar;
class LLDataPacker;
class LLDataPackerBinaryBuffer;
class LLDrawable;
@@ -67,6 +69,8 @@ class LLViewerRegion;
class LLViewerTexture;
class LLWorld;
+class LLMeshCostData;
+
typedef enum e_object_update_type
{
OUT_FULL,
@@ -220,6 +224,8 @@ public:
LLViewerRegion* getRegion() const { return mRegionp; }
BOOL isSelected() const { return mUserSelected; }
+ // Check whole linkset
+ BOOL isAnySelected() const;
virtual void setSelected(BOOL sel);
const LLUUID &getID() const { return mID; }
@@ -231,6 +237,7 @@ public:
virtual BOOL isFlexible() const { return FALSE; }
virtual BOOL isSculpted() const { return FALSE; }
virtual BOOL isMesh() const { return FALSE; }
+ virtual BOOL isRiggedMesh() const { return FALSE; }
virtual BOOL hasLightTexture() const { return FALSE; }
// This method returns true if the object is over land owned by
@@ -255,6 +262,8 @@ public:
*/
virtual BOOL setParent(LLViewerObject* parent);
+ virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent);
+ virtual void afterReparent();
virtual void addChild(LLViewerObject *childp);
virtual void removeChild(LLViewerObject *childp);
const_child_list_t& getChildren() const { return mChildList; }
@@ -356,9 +365,17 @@ public:
virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
- virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL, F32* unscaled_value = NULL) const;
+ S32 getAnimatedObjectMaxTris() const;
+ F32 recursiveGetEstTrianglesMax() const;
+ virtual F32 getEstTrianglesMax() const;
+ virtual F32 getEstTrianglesStreamingCost() const;
+ virtual F32 getStreamingCost() const;
+ virtual bool getCostData(LLMeshCostData& costs) const;
virtual U32 getTriangleCount(S32* vcount = NULL) const;
virtual U32 getHighLODTriangleCount();
+ F32 recursiveGetScaledSurfaceArea() const;
+
+ U32 recursiveGetTriangleCount(S32* vcount = NULL) const;
void setObjectCost(F32 cost);
F32 getObjectCost();
@@ -374,7 +391,7 @@ public:
void sendShapeUpdate();
- U8 getState() { return mState; }
+ U8 getAttachmentState() { return mAttachmentState; }
F32 getAppAngle() const { return mAppAngle; }
F32 getPixelArea() const { return mPixelArea; }
@@ -411,7 +428,8 @@ public:
void setIcon(LLViewerTexture* icon_image);
void clearIcon();
- void markForUpdate(BOOL priority);
+ void recursiveMarkForUpdate(BOOL priority);
+ virtual void markForUpdate(BOOL priority);
void markForUnload(BOOL priority);
void updateVolume(const LLVolumeParams& volume_params);
virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max);
@@ -686,6 +704,27 @@ public:
static BOOL sUseSharedDrawables;
+public:
+ // Returns mControlAvatar for the edit root prim of this linkset
+ LLControlAvatar *getControlAvatar();
+ LLControlAvatar *getControlAvatar() const;
+
+ // Create or connect to an existing control av as applicable
+ void linkControlAvatar();
+ // Remove any reference to control av for this prim
+ void unlinkControlAvatar();
+ // Link or unlink as needed
+ void updateControlAvatar();
+
+ virtual bool isAnimatedObject() const;
+
+ // Flags for createObject
+ static const S32 CO_FLAG_CONTROL_AVATAR = 1 << 0;
+ static const S32 CO_FLAG_UI_AVATAR = 1 << 1;
+
+protected:
+ LLPointer<LLControlAvatar> mControlAvatar;
+
protected:
// delete an item in the inventory, but don't tell the
// server. This is used internally by remove, update, and
@@ -696,8 +735,7 @@ protected:
// updateInventory.
void doUpdateInventory(LLPointer<LLViewerInventoryItem>& item, U8 key, bool is_new);
-
- static LLViewerObject *createObject(const LLUUID &id, LLPCode pcode, LLViewerRegion *regionp);
+ static LLViewerObject *createObject(const LLUUID &id, LLPCode pcode, LLViewerRegion *regionp, S32 flags = 0);
BOOL setData(const U8 *datap, const U32 data_size);
@@ -785,7 +823,7 @@ protected:
LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations
LLQuaternion mPreviousRotation;
- U8 mState; // legacy
+ U8 mAttachmentState; // this encodes the attachment id in a somewhat complex way. 0 if not an attachment.
LLViewerObjectMedia* mMedia; // NULL if no media associated
U8 mClickAction;
F32 mObjectCost; //resource cost of this object or -1 if unknown
@@ -841,6 +879,10 @@ public:
BOOL getLastUpdateCached() const;
void setLastUpdateCached(BOOL last_update_cached);
+ virtual void updateRiggingInfo() {}
+
+ LLJointRiggingInfoTab mJointRiggingInfoTab;
+
private:
LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory.
EObjectUpdateType mLastUpdateType;