diff options
author | dolphin <dolphin@lindenlab.com> | 2014-05-07 11:14:26 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2014-05-07 11:14:26 -0700 |
commit | 48fece44737fa8b9614fd864354d9287a216ea33 (patch) | |
tree | f68426d79f4631c6b49be142a92e59086870fa38 /indra/newview/llviewerobject.h | |
parent | ae856ef31830912cec0f4de37167858a24e4ba30 (diff) | |
parent | d0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff) |
Merge with 3.7.7-release
Diffstat (limited to 'indra/newview/llviewerobject.h')
-rwxr-xr-x | indra/newview/llviewerobject.h | 61 |
1 files changed, 36 insertions, 25 deletions
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index c34d4493d5..d92c00a6b2 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -30,8 +30,7 @@ #include <map> #include "llassetstorage.h" -#include "lldarrayptr.h" -#include "llhudicon.h" +//#include "llhudicon.h" #include "llinventory.h" #include "llrefcount.h" #include "llprimitive.h" @@ -43,33 +42,30 @@ #include "v3math.h" #include "llvertexbuffer.h" #include "llbbox.h" -#include "llbbox.h" class LLAgent; // TODO: Get rid of this. class LLAudioSource; class LLAudioSourceVO; -class LLDataPacker; class LLColor4; -class LLFrameTimer; +class LLDataPacker; +class LLDataPackerBinaryBuffer; class LLDrawable; -class LLHost; class LLHUDText; -class LLWorld; -class LLNameValue; -class LLNetMap; +class LLHost; class LLMessageSystem; +class LLNameValue; class LLPartSysData; -class LLPrimitive; class LLPipeline; class LLTextureEntry; -class LLViewerTexture; +class LLVOAvatar; +class LLVOInventoryListener; class LLViewerInventoryItem; class LLViewerObject; +class LLViewerObjectMedia; class LLViewerPartSourceScript; class LLViewerRegion; -class LLViewerObjectMedia; -class LLVOInventoryListener; -class LLVOAvatar; +class LLViewerTexture; +class LLWorld; typedef enum e_object_update_type { @@ -107,7 +103,11 @@ struct PotentialReturnableObject //============================================================================ -class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate +class LLViewerObject +: public LLPrimitive, + public LLRefCount, + public LLGLUpdate, + public LLTrace::MemTrackable<LLViewerObject> { protected: ~LLViewerObject(); // use unref() @@ -157,6 +157,7 @@ public: INVALID_UPDATE = 0x80000000 }; + static U32 extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector3& pos, LLVector3& scale, LLQuaternion& rot); virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, void **user_data, U32 block_num, @@ -525,6 +526,7 @@ public: virtual void updateRegion(LLViewerRegion *regionp); void updateFlags(BOOL physics_changed = FALSE); + void loadFlags(U32 flags); //load flags from cache or from message BOOL setFlags(U32 flag, BOOL state); BOOL setFlagsWithoutUpdate(U32 flag, BOOL state); void setPhysicsShapeType(U8 type); @@ -555,6 +557,13 @@ public: friend class LLViewerMediaList; public: + static void unpackVector3(LLDataPackerBinaryBuffer* dp, LLVector3& value, std::string name); + static void unpackUUID(LLDataPackerBinaryBuffer* dp, LLUUID& value, std::string name); + static void unpackU32(LLDataPackerBinaryBuffer* dp, U32& value, std::string name); + static void unpackU8(LLDataPackerBinaryBuffer* dp, U8& value, std::string name); + static U32 unpackParentID(LLDataPackerBinaryBuffer* dp, U32& parent_id); + +public: //counter-translation void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ; //counter-rotation @@ -575,7 +584,9 @@ private: U32 checkMediaURL(const std::string &media_url); // Motion prediction between updates - void interpolateLinearMotion(const F64 & time, const F32 & dt); + void interpolateLinearMotion(const F64SecondsImplicit & time, const F32SecondsImplicit & dt); + + static void initObjectDataMap(); public: // @@ -628,6 +639,7 @@ private: // Grabbed from UPDATE_FLAGS U32 mFlags; + static std::map<std::string, U32> sObjectDataMap; public: // Sent to sim in UPDATE_FLAGS, received in ObjectPhysicsProperties U8 mPhysicsShapeType; @@ -651,7 +663,7 @@ public: // TODO: Make all this stuff private. JC LLPointer<LLHUDText> mText; - LLPointer<LLHUDIcon> mIcon; + LLPointer<class LLHUDIcon> mIcon; static BOOL sUseSharedDrawables; @@ -689,8 +701,6 @@ protected: void deleteParticleSource(); void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id); -public: - private: void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string void deleteTEImages(); // correctly deletes list of images @@ -701,8 +711,8 @@ protected: child_list_t mChildList; - F64 mLastInterpUpdateSecs; // Last update for purposes of interpolation - F64 mLastMessageUpdateSecs; // Last update from a message from the simulator + F64Seconds mLastInterpUpdateSecs; // Last update for purposes of interpolation + F64Seconds mLastMessageUpdateSecs; // Last update from a message from the simulator TPACKETID mLatestRecvPacketID; // Latest time stamp on message from simulator // extra data sent from the sim...currently only used for tree species info @@ -768,12 +778,13 @@ protected: static S32 sAxisArrowLength; + // These two caches are only correct for non-parented objects right now! mutable LLVector3 mPositionRegion; mutable LLVector3 mPositionAgent; - static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64) value; } - static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64) value; } + static void setPhaseOutUpdateInterpolationTime(F32 value) { sPhaseOutUpdateInterpolationTime = (F64Seconds) value; } + static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64Seconds) value; } static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; } static void setPingInterpolate(BOOL value) { sPingInterpolate = value; } @@ -781,8 +792,8 @@ protected: private: static S32 sNumObjects; - static F64 sPhaseOutUpdateInterpolationTime; // For motion interpolation - static F64 sMaxUpdateInterpolationTime; // For motion interpolation + static F64Seconds sPhaseOutUpdateInterpolationTime; // For motion interpolation + static F64Seconds sMaxUpdateInterpolationTime; // For motion interpolation static BOOL sVelocityInterpolate; static BOOL sPingInterpolate; |