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.h43
1 files changed, 38 insertions, 5 deletions
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 21c95d5533..ab0e74bc97 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -47,6 +47,7 @@ class LLAgent; // TODO: Get rid of this.
class LLAudioSource;
class LLAudioSourceVO;
class LLColor4;
+class LLControlAvatar;
class LLDataPacker;
class LLDataPackerBinaryBuffer;
class LLDrawable;
@@ -220,6 +221,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 +234,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 +259,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 +362,15 @@ public:
virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
+ S32 getAnimatedObjectMaxTris() const;
+ F32 recursiveGetEstTrianglesMax() const;
+ virtual F32 getEstTrianglesMax() const;
virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL, F32* unscaled_value = NULL) 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 +386,7 @@ public:
void sendShapeUpdate();
- U8 getState() { return mState; }
+ U8 getAttachmentState() { return mAttachmentState; }
F32 getAppAngle() const { return mAppAngle; }
F32 getPixelArea() const { return mPixelArea; }
@@ -411,7 +423,8 @@ public:
void setIcon(LLViewerTexture* icon_image);
void clearIcon();
- void markForUpdate(BOOL priority);
+ void recursiveMarkForUpdate(BOOL priority);
+ virtual void markForUpdate(BOOL priority);
void updateVolume(const LLVolumeParams& volume_params);
virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max);
virtual F32 getBinRadius();
@@ -685,6 +698,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
@@ -695,8 +729,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);
@@ -784,7 +817,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