From 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:50 -0500 Subject: Second Life viewer sources 1.14.0.0 --- linden/indra/newview/llviewerobject.h | 51 ++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 6 deletions(-) (limited to 'linden/indra/newview/llviewerobject.h') 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 @@ #include "llhudicon.h" #include "llinventory.h" #include "llmemory.h" +#include "llmemtype.h" #include "llprimitive.h" #include "lluuid.h" #include "llvoinventorylistener.h" @@ -44,6 +45,7 @@ #include "llquaternion.h" #include "v3dmath.h" #include "v3math.h" +#include "llvertexbuffer.h" class LLAgent; // TODO: Get rid of this. class LLAudioSource; @@ -187,6 +189,7 @@ public: virtual LLDrawable* createDrawable(LLPipeline *pipeline); virtual BOOL updateGeometry(LLDrawable *drawable); + virtual void updateFaceSize(S32 idx); virtual BOOL updateLOD(); virtual BOOL setDrawableParent(LLDrawable* parentp); virtual BOOL updateLighting(BOOL do_lighting) { return TRUE; }; @@ -203,7 +206,7 @@ public: LLViewerRegion* getRegion() const { return mRegionp; } BOOL isSelected() const { return mUserSelected; } - void setSelected(BOOL sel) { mUserSelected = sel; mRotTime = 0.f;} + virtual void setSelected(BOOL sel) { mUserSelected = sel; mRotTime = 0.f;} const LLUUID &getID() const { return mID; } U32 getLocalID() const { return mLocalID; } @@ -293,8 +296,6 @@ public: /*virtual*/ BOOL setMaterial(const U8 material); virtual void setTEImage(const U8 te, LLViewerImage *imagep); // Not derived from LLPrimitive LLViewerImage *getTEImage(const U8 te) const; - - S32 getFaceIndexOffset() { return mFaceIndexOffset; } void fitFaceTexture(const U8 face); void sendTEUpdate() const; // Sends packed representation of all texture entry information @@ -307,6 +308,8 @@ public: U8 getState() { return mState; } F32 getAppAngle() const { return mAppAngle; } + F32 getPixelArea() const { return mPixelArea; } + void setPixelArea(F32 area) { mPixelArea = area; } F32 getMaxScale() const; F32 getMidScale() const; F32 getMinScale() const; @@ -339,6 +342,7 @@ public: void markForUpdate(BOOL priority); void updateVolume(const LLVolumeParams& volume_params); virtual void updateSpatialExtents(LLVector3& min, LLVector3& max); + virtual F32 getBinRadius(); LLBBox getBoundingBoxAgent() const; @@ -378,6 +382,11 @@ public: LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id); S16 getInventorySerial() const { return mInventorySerialNum; } + // These functions does viewer-side only object inventory modifications + void updateViewerInventoryAsset( + const LLViewerInventoryItem* item, + const LLUUID& new_asset); + // This function will make sure that we refresh the inventory. void dirtyInventory(); BOOL isInventoryDirty() { return mInventoryDirty; } @@ -436,6 +445,7 @@ public: void printNameValuePairs() const; virtual S32 getLOD() const { return 3; } + virtual U32 getPartitionType() const; virtual LLNetworkData* getParameterEntry(U16 param_type) const; virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin); @@ -536,6 +546,7 @@ protected: void unpackParticleSource(const S32 block_num, const LLUUID& owner_id); void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id); + void deleteParticleSource(); private: 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: F64 mLastInterpUpdateSecs; // Last update for purposes of interpolation F64 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 U8* mData; @@ -578,7 +589,6 @@ protected: BOOL mOnActiveList; BOOL mOnMap; // On the map. BOOL mStatic; // Object doesn't move. - S32 mFaceIndexOffset; // offset into drawable's faces, zero except in special cases S32 mNumFaces; S32 mLastUpdateFrame; // frames in which an object had last moved for smart coalescing of drawables @@ -611,7 +621,6 @@ private: static S32 sNumObjects; }; - /////////////////// // // Inlines @@ -642,4 +651,34 @@ public: U8 mMediaType; // see LLTextureEntry::WEB_PAGE, etc. }; +// subclass of viewer object that can be added to particle partitions +class LLAlphaObject : public LLViewerObject +{ +public: + LLAlphaObject(const LLUUID &id, const LLPCode type, LLViewerRegion *regionp) + : LLViewerObject(id,type,regionp) + { mDepth = 0.f; } + + virtual BOOL isParticle(); + virtual F32 getPartSize(S32 idx); + virtual void getGeometry(S32 idx, + LLStrider& verticesp, + LLStrider& normalsp, + LLStrider& texcoordsp, + LLStrider& colorsp, + LLStrider& indicesp) = 0; + + F32 mDepth; +}; + +class LLStaticViewerObject : public LLViewerObject +{ +public: + LLStaticViewerObject(const LLUUID& id, const LLPCode type, LLViewerRegion* regionp) + : LLViewerObject(id,type,regionp) + { } + + virtual void updateDrawable(BOOL force_damped); +}; + #endif -- cgit v1.1