summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-11-11 19:17:49 -0800
committerRichard Linden <none@none>2013-11-11 19:17:49 -0800
commit17e9c872ada0cd1d3bf5c16887ee7f220f3a10c7 (patch)
tree93f36acc00695d7b4ee2e43d08ce790358966f38 /indra/newview/llviewerobject.h
parentebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff)
parent1983f52ce5211c02a55f5cabd86962eea3a22084 (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llviewerobject.h')
-rwxr-xr-xindra/newview/llviewerobject.h63
1 files changed, 37 insertions, 26 deletions
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 80bdd628a1..a2008215d2 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,
@@ -305,7 +306,7 @@ public:
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid);
/*virtual*/ S32 setTENormalMap(const U8 te, const LLUUID &uuid);
/*virtual*/ S32 setTESpecularMap(const U8 te, const LLUUID &uuid);
- S32 setTETextureCore(const U8 te, LLViewerTexture *image);
+ S32 setTETextureCore(const U8 te, LLViewerTexture *image);
S32 setTENormalMapCore(const U8 te, LLViewerTexture *image);
S32 setTESpecularMapCore(const U8 te, LLViewerTexture *image);
/*virtual*/ S32 setTEColor(const U8 te, const LLColor3 &color);
@@ -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
@@ -769,12 +779,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; }
@@ -782,8 +793,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;