Full v2.6 renderer.
This commit is contained in:
@@ -1515,6 +1515,8 @@ BOOL LLNetworkData::isValid(U16 param_type, U32 size)
|
||||
return (size == 16);
|
||||
case PARAMS_SCULPT:
|
||||
return (size == 17);
|
||||
case PARAMS_LIGHT_IMAGE:
|
||||
return (size == 28);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -1847,3 +1849,78 @@ bool LLSculptParams::fromLLSD(LLSD& sd)
|
||||
return false;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
LLLightImageParams::LLLightImageParams()
|
||||
{
|
||||
mType = PARAMS_LIGHT_IMAGE;
|
||||
mParams.setVec(F_PI*0.5f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
BOOL LLLightImageParams::pack(LLDataPacker &dp) const
|
||||
{
|
||||
dp.packUUID(mLightTexture, "texture");
|
||||
dp.packVector3(mParams, "params");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLLightImageParams::unpack(LLDataPacker &dp)
|
||||
{
|
||||
dp.unpackUUID(mLightTexture, "texture");
|
||||
dp.unpackVector3(mParams, "params");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool LLLightImageParams::operator==(const LLNetworkData& data) const
|
||||
{
|
||||
if (data.mType != PARAMS_LIGHT_IMAGE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const LLLightImageParams *param = (const LLLightImageParams*)&data;
|
||||
if ( (param->mLightTexture != mLightTexture) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( (param->mParams != mParams ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLLightImageParams::copy(const LLNetworkData& data)
|
||||
{
|
||||
const LLLightImageParams *param = (LLLightImageParams*)&data;
|
||||
mLightTexture = param->mLightTexture;
|
||||
mParams = param->mParams;
|
||||
}
|
||||
|
||||
|
||||
|
||||
LLSD LLLightImageParams::asLLSD() const
|
||||
{
|
||||
LLSD sd;
|
||||
|
||||
sd["texture"] = mLightTexture;
|
||||
sd["params"] = mParams.getValue();
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
||||
bool LLLightImageParams::fromLLSD(LLSD& sd)
|
||||
{
|
||||
if (sd.has("texture"))
|
||||
{
|
||||
setLightTexture( sd["texture"] );
|
||||
setParams( LLVector3( sd["params"] ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,8 @@ public:
|
||||
{
|
||||
PARAMS_FLEXIBLE = 0x10,
|
||||
PARAMS_LIGHT = 0x20,
|
||||
PARAMS_SCULPT = 0x30
|
||||
PARAMS_SCULPT = 0x30,
|
||||
PARAMS_LIGHT_IMAGE = 0x40,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -267,6 +268,29 @@ public:
|
||||
U8 getSculptType() const { return mSculptType; }
|
||||
};
|
||||
|
||||
class LLLightImageParams : public LLNetworkData
|
||||
{
|
||||
protected:
|
||||
LLUUID mLightTexture;
|
||||
LLVector3 mParams;
|
||||
|
||||
public:
|
||||
LLLightImageParams();
|
||||
/*virtual*/ BOOL pack(LLDataPacker &dp) const;
|
||||
/*virtual*/ BOOL unpack(LLDataPacker &dp);
|
||||
/*virtual*/ bool operator==(const LLNetworkData& data) const;
|
||||
/*virtual*/ void copy(const LLNetworkData& data);
|
||||
LLSD asLLSD() const;
|
||||
operator LLSD() const { return asLLSD(); }
|
||||
bool fromLLSD(LLSD& sd);
|
||||
|
||||
void setLightTexture(const LLUUID& id) { mLightTexture = id; }
|
||||
LLUUID getLightTexture() const { return mLightTexture; }
|
||||
bool isLightSpotlight() const { return mLightTexture.notNull(); }
|
||||
void setParams(const LLVector3& params) { mParams = params; }
|
||||
LLVector3 getParams() const { return mParams; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
class LLPrimitive : public LLXform
|
||||
|
||||
Reference in New Issue
Block a user