From 25bffc3d43ec7696c0a9fab43514affbfe006fb9 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 3 Dec 2012 15:20:11 +0100 Subject: Added LLMaterialMgr::get() to retrieve individual materials (with optional callback) --- indra/llprimitive/llmaterial.h | 4 ++++ indra/llprimitive/llmaterialid.cpp | 5 +++++ indra/llprimitive/llmaterialid.h | 1 + 3 files changed, 10 insertions(+) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h index 42e3dd04b9..da364e548c 100644 --- a/indra/llprimitive/llmaterial.h +++ b/indra/llprimitive/llmaterial.h @@ -27,6 +27,8 @@ #ifndef LL_LLMATERIAL_H #define LL_LLMATERIAL_H +#include + #include "llmaterialid.h" #include "llsd.h" #include "v4coloru.h" @@ -94,4 +96,6 @@ protected: U8 mAlphaMaskCutoff; }; +typedef boost::shared_ptr LLMaterialPtr; + #endif // LL_LLMATERIAL_H diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp index 73a61f9c54..bbbbf0ced3 100644 --- a/indra/llprimitive/llmaterialid.cpp +++ b/indra/llprimitive/llmaterialid.cpp @@ -77,6 +77,11 @@ LLMaterialID& LLMaterialID::operator = (const LLMaterialID& pOtherMaterialID) return (*this); } +bool LLMaterialID::operator < (const LLMaterialID& pOtherMaterialID) const +{ + return (compareToOtherMaterialID(pOtherMaterialID) < 0); +} + bool LLMaterialID::isNull() const { return (compareToOtherMaterialID(LLMaterialID::null) == 0); diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h index a474703f79..ffefc9f11c 100644 --- a/indra/llprimitive/llmaterialid.h +++ b/indra/llprimitive/llmaterialid.h @@ -42,6 +42,7 @@ public: bool operator == (const LLMaterialID& pOtherMaterialID) const; bool operator != (const LLMaterialID& pOtherMaterialID) const; LLMaterialID& operator = (const LLMaterialID& pOtherMaterialID); + bool operator < (const LLMaterialID& pOtherMaterialID) const; bool isNull() const; -- cgit v1.2.3