aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerobject.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llviewerobject.h
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerobject.h51
1 files changed, 45 insertions, 6 deletions
diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h
index a439a01..7176d24 100644
--- a/linden/indra/newview/llviewerobject.h
+++ b/linden/indra/newview/llviewerobject.h
@@ -37,6 +37,7 @@
37#include "llhudicon.h" 37#include "llhudicon.h"
38#include "llinventory.h" 38#include "llinventory.h"
39#include "llmemory.h" 39#include "llmemory.h"
40#include "llmemtype.h"
40#include "llprimitive.h" 41#include "llprimitive.h"
41#include "lluuid.h" 42#include "lluuid.h"
42#include "llvoinventorylistener.h" 43#include "llvoinventorylistener.h"
@@ -44,6 +45,7 @@
44#include "llquaternion.h" 45#include "llquaternion.h"
45#include "v3dmath.h" 46#include "v3dmath.h"
46#include "v3math.h" 47#include "v3math.h"
48#include "llvertexbuffer.h"
47 49
48class LLAgent; // TODO: Get rid of this. 50class LLAgent; // TODO: Get rid of this.
49class LLAudioSource; 51class LLAudioSource;
@@ -187,6 +189,7 @@ public:
187 189
188 virtual LLDrawable* createDrawable(LLPipeline *pipeline); 190 virtual LLDrawable* createDrawable(LLPipeline *pipeline);
189 virtual BOOL updateGeometry(LLDrawable *drawable); 191 virtual BOOL updateGeometry(LLDrawable *drawable);
192 virtual void updateFaceSize(S32 idx);
190 virtual BOOL updateLOD(); 193 virtual BOOL updateLOD();
191 virtual BOOL setDrawableParent(LLDrawable* parentp); 194 virtual BOOL setDrawableParent(LLDrawable* parentp);
192 virtual BOOL updateLighting(BOOL do_lighting) { return TRUE; }; 195 virtual BOOL updateLighting(BOOL do_lighting) { return TRUE; };
@@ -203,7 +206,7 @@ public:
203 LLViewerRegion* getRegion() const { return mRegionp; } 206 LLViewerRegion* getRegion() const { return mRegionp; }
204 207
205 BOOL isSelected() const { return mUserSelected; } 208 BOOL isSelected() const { return mUserSelected; }
206 void setSelected(BOOL sel) { mUserSelected = sel; mRotTime = 0.f;} 209 virtual void setSelected(BOOL sel) { mUserSelected = sel; mRotTime = 0.f;}
207 210
208 const LLUUID &getID() const { return mID; } 211 const LLUUID &getID() const { return mID; }
209 U32 getLocalID() const { return mLocalID; } 212 U32 getLocalID() const { return mLocalID; }
@@ -293,8 +296,6 @@ public:
293 /*virtual*/ BOOL setMaterial(const U8 material); 296 /*virtual*/ BOOL setMaterial(const U8 material);
294 virtual void setTEImage(const U8 te, LLViewerImage *imagep); // Not derived from LLPrimitive 297 virtual void setTEImage(const U8 te, LLViewerImage *imagep); // Not derived from LLPrimitive
295 LLViewerImage *getTEImage(const U8 te) const; 298 LLViewerImage *getTEImage(const U8 te) const;
296
297 S32 getFaceIndexOffset() { return mFaceIndexOffset; }
298 299
299 void fitFaceTexture(const U8 face); 300 void fitFaceTexture(const U8 face);
300 void sendTEUpdate() const; // Sends packed representation of all texture entry information 301 void sendTEUpdate() const; // Sends packed representation of all texture entry information
@@ -307,6 +308,8 @@ public:
307 U8 getState() { return mState; } 308 U8 getState() { return mState; }
308 309
309 F32 getAppAngle() const { return mAppAngle; } 310 F32 getAppAngle() const { return mAppAngle; }
311 F32 getPixelArea() const { return mPixelArea; }
312 void setPixelArea(F32 area) { mPixelArea = area; }
310 F32 getMaxScale() const; 313 F32 getMaxScale() const;
311 F32 getMidScale() const; 314 F32 getMidScale() const;
312 F32 getMinScale() const; 315 F32 getMinScale() const;
@@ -339,6 +342,7 @@ public:
339 void markForUpdate(BOOL priority); 342 void markForUpdate(BOOL priority);
340 void updateVolume(const LLVolumeParams& volume_params); 343 void updateVolume(const LLVolumeParams& volume_params);
341 virtual void updateSpatialExtents(LLVector3& min, LLVector3& max); 344 virtual void updateSpatialExtents(LLVector3& min, LLVector3& max);
345 virtual F32 getBinRadius();
342 346
343 LLBBox getBoundingBoxAgent() const; 347 LLBBox getBoundingBoxAgent() const;
344 348
@@ -378,6 +382,11 @@ public:
378 LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id); 382 LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id);
379 S16 getInventorySerial() const { return mInventorySerialNum; } 383 S16 getInventorySerial() const { return mInventorySerialNum; }
380 384
385 // These functions does viewer-side only object inventory modifications
386 void updateViewerInventoryAsset(
387 const LLViewerInventoryItem* item,
388 const LLUUID& new_asset);
389
381 // This function will make sure that we refresh the inventory. 390 // This function will make sure that we refresh the inventory.
382 void dirtyInventory(); 391 void dirtyInventory();
383 BOOL isInventoryDirty() { return mInventoryDirty; } 392 BOOL isInventoryDirty() { return mInventoryDirty; }
@@ -436,6 +445,7 @@ public:
436 void printNameValuePairs() const; 445 void printNameValuePairs() const;
437 446
438 virtual S32 getLOD() const { return 3; } 447 virtual S32 getLOD() const { return 3; }
448 virtual U32 getPartitionType() const;
439 449
440 virtual LLNetworkData* getParameterEntry(U16 param_type) const; 450 virtual LLNetworkData* getParameterEntry(U16 param_type) const;
441 virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin); 451 virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin);
@@ -536,6 +546,7 @@ protected:
536 546
537 void unpackParticleSource(const S32 block_num, const LLUUID& owner_id); 547 void unpackParticleSource(const S32 block_num, const LLUUID& owner_id);
538 void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id); 548 void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id);
549 void deleteParticleSource();
539 550
540private: 551private:
541 void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string 552 void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string
@@ -547,7 +558,7 @@ protected:
547 558
548 F64 mLastInterpUpdateSecs; // Last update for purposes of interpolation 559 F64 mLastInterpUpdateSecs; // Last update for purposes of interpolation
549 F64 mLastMessageUpdateSecs; // Last update from a message from the simulator 560 F64 mLastMessageUpdateSecs; // Last update from a message from the simulator
550 561 TPACKETID mLatestRecvPacketID; // Latest time stamp on message from simulator
551 // extra data sent from the sim...currently only used for tree species info 562 // extra data sent from the sim...currently only used for tree species info
552 U8* mData; 563 U8* mData;
553 564
@@ -578,7 +589,6 @@ protected:
578 BOOL mOnActiveList; 589 BOOL mOnActiveList;
579 BOOL mOnMap; // On the map. 590 BOOL mOnMap; // On the map.
580 BOOL mStatic; // Object doesn't move. 591 BOOL mStatic; // Object doesn't move.
581 S32 mFaceIndexOffset; // offset into drawable's faces, zero except in special cases
582 S32 mNumFaces; 592 S32 mNumFaces;
583 593
584 S32 mLastUpdateFrame; // frames in which an object had last moved for smart coalescing of drawables 594 S32 mLastUpdateFrame; // frames in which an object had last moved for smart coalescing of drawables
@@ -611,7 +621,6 @@ private:
611 static S32 sNumObjects; 621 static S32 sNumObjects;
612}; 622};
613 623
614
615/////////////////// 624///////////////////
616// 625//
617// Inlines 626// Inlines
@@ -642,4 +651,34 @@ public:
642 U8 mMediaType; // see LLTextureEntry::WEB_PAGE, etc. 651 U8 mMediaType; // see LLTextureEntry::WEB_PAGE, etc.
643}; 652};
644 653
654// subclass of viewer object that can be added to particle partitions
655class LLAlphaObject : public LLViewerObject
656{
657public:
658 LLAlphaObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp)
659 : LLViewerObject(id,type,regionp)
660 { mDepth = 0.f; }
661
662 virtual BOOL isParticle();
663 virtual F32 getPartSize(S32 idx);
664 virtual void getGeometry(S32 idx,
665 LLStrider<LLVector3>& verticesp,
666 LLStrider<LLVector3>& normalsp,
667 LLStrider<LLVector2>& texcoordsp,
668 LLStrider<LLColor4U>& colorsp,
669 LLStrider<U32>& indicesp) = 0;
670
671 F32 mDepth;
672};
673
674class LLStaticViewerObject : public LLViewerObject
675{
676public:
677 LLStaticViewerObject(const LLUUID& id, const LLPCode type, LLViewerRegion* regionp)
678 : LLViewerObject(id,type,regionp)
679 { }
680
681 virtual void updateDrawable(BOOL force_damped);
682};
683
645#endif 684#endif