diff options
Diffstat (limited to 'indra/newview/llviewerobject.h')
-rw-r--r-- | indra/newview/llviewerobject.h | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 0005cdf14e..8c4afdcba4 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -43,6 +43,7 @@ #include "llvertexbuffer.h" #include "llbbox.h" #include "llrigginginfo.h" +#include "llreflectionmap.h" class LLAgent; // TODO: Get rid of this. class LLAudioSource; @@ -178,6 +179,19 @@ public: const std::string& getAttachmentItemName() const; virtual LLVOAvatar* getAvatar() const; //get the avatar this object is attached to, or NULL if object is not an attachment + + bool hasRenderMaterialParams() const; + void setHasRenderMaterialParams(bool has_params); + + const LLUUID& getRenderMaterialID(U8 te) const; + + // set the RenderMaterialID for the given TextureEntry + // te - TextureEntry index to set, or -1 for all TEs + // id - asset id of material asset + // update_server - if true, will send updates to server + void setRenderMaterialID(S32 te, const LLUUID& id, bool update_server = true); + void setRenderMaterialIDs(const LLUUID& id); + virtual BOOL isHUDAttachment() const { return FALSE; } virtual BOOL isTempAttachment() const; @@ -199,6 +213,7 @@ public: // Graphical stuff for objects - maybe broken out into render class later? virtual void updateTextures(); + virtual void faceMappingChanged() {} virtual void boostTexturePriority(BOOL boost_children = TRUE); // When you just want to boost priority of this object virtual LLDrawable* createDrawable(LLPipeline *pipeline); @@ -210,6 +225,7 @@ public: F32 getRotTime() { return mRotTime; } private: void resetRotTime(); + void setRenderMaterialIDs(const LLRenderMaterialParams* material_params, bool local_origin); public: void resetRot(); void applyAngularVelocity(F32 dt); @@ -238,6 +254,7 @@ public: virtual BOOL isMesh() const { return FALSE; } virtual BOOL isRiggedMesh() const { return FALSE; } virtual BOOL hasLightTexture() const { return FALSE; } + virtual BOOL isReflectionProbe() const { return FALSE; } // This method returns true if the object is over land owned by // the agent, one of its groups, or it encroaches and @@ -279,6 +296,7 @@ public: S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, BOOL pick_rigged = FALSE, + BOOL pick_unselectable = TRUE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -318,6 +336,7 @@ public: /*virtual*/ void setNumTEs(const U8 num_tes); /*virtual*/ void setTE(const U8 te, const LLTextureEntry &texture_entry); + void updateTEMaterialTextures(U8 te); /*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); @@ -342,6 +361,7 @@ public: /*virtual*/ S32 setTEGlow(const U8 te, const F32 glow); /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID); /*virtual*/ S32 setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams); + virtual S32 setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat); // Used by Materials update functions to properly kick off rebuilds // of VBs etc when materials updates require changes. @@ -356,7 +376,7 @@ public: LLViewerTexture *getTEImage(const U8 te) const; LLViewerTexture *getTENormalMap(const U8 te) const; LLViewerTexture *getTESpecularMap(const U8 te) const; - + bool isImageAlphaBlended(const U8 te) const; void fitFaceTexture(const U8 face); @@ -420,8 +440,6 @@ public: void sendMaterialUpdate() const; - void setCanSelect(BOOL canSelect); - void setDebugText(const std::string &utf8text); void initHudText(); void restoreHudText(); @@ -472,7 +490,7 @@ public: // manager until we have better iterators. void updateInventory(LLViewerInventoryItem* item, U8 key, bool is_new); void updateInventoryLocal(LLInventoryItem* item, U8 key); // Update without messaging. - void updateTextureInventory(LLViewerInventoryItem* item, U8 key, bool is_new); + void updateMaterialInventory(LLViewerInventoryItem* item, U8 key, bool is_new); LLInventoryObject* getInventoryObject(const LLUUID& item_id); // Get content except for root category @@ -481,8 +499,6 @@ public: LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id); S16 getInventorySerial() const { return mInventorySerialNum; } - bool isTextureInInventory(LLViewerInventoryItem* item); - // These functions does viewer-side only object inventory modifications void updateViewerInventoryAsset( const LLViewerInventoryItem* item, @@ -611,6 +627,8 @@ public: std::vector<LLVector3> mUnselectedChildrenPositions ; private: + bool isAssetInInventory(LLViewerInventoryItem* item); + ExtraParameter* createNewParameterEntry(U16 param_type); ExtraParameter* getExtraParameterEntry(U16 param_type) const; ExtraParameter* getExtraParameterEntryCreate(U16 param_type); @@ -674,10 +692,10 @@ public: LLPointer<LLViewerTexture> *mTEImages; LLPointer<LLViewerTexture> *mTENormalMaps; LLPointer<LLViewerTexture> *mTESpecularMaps; - - // Selection, picking and rendering variables - U32 mGLName; // GL "name" used by selection code - BOOL mbCanSelect; // true if user can select this object by clicking + + // true if user can select this object by clicking under any circumstances (even if pick_unselectable is true) + // can likely be factored out + BOOL mbCanSelect; private: // Grabbed from UPDATE_FLAGS @@ -847,7 +865,7 @@ protected: F32 mLinksetCost; F32 mPhysicsCost; F32 mLinksetPhysicsCost; - + bool mCostStale; mutable bool mPhysicsShapeUnknown; @@ -906,6 +924,11 @@ private: LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory. EObjectUpdateType mLastUpdateType; BOOL mLastUpdateCached; + +public: + // reflection probe state + bool mIsReflectionProbe = false; // if true, this object should register itself with LLReflectionProbeManager + LLPointer<LLReflectionMap> mReflectionProbe = nullptr; // reflection probe coupled to this viewer object. If not null, should be deregistered when this object is destroyed }; /////////////////// |