aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llprimitive
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:57 -0500
committerJacek Antonelli2008-08-15 23:44:57 -0500
commitda68d3a57ecb27eba5d7efb8ff77d9640c0be65e (patch)
treef2fa2b9ed6e8cf49c8a3cb2a1893c4e5c61916a1 /linden/indra/llprimitive
parentSecond Life viewer sources 1.15.1.3 (diff)
downloadmeta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.zip
meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.gz
meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.bz2
meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.xz
Second Life viewer sources 1.16.0.5
Diffstat (limited to 'linden/indra/llprimitive')
-rw-r--r--linden/indra/llprimitive/llprimitive.cpp97
-rw-r--r--linden/indra/llprimitive/llprimitive.h28
-rw-r--r--linden/indra/llprimitive/lltextureentry.cpp15
-rw-r--r--linden/indra/llprimitive/lltextureentry.h8
4 files changed, 136 insertions, 12 deletions
diff --git a/linden/indra/llprimitive/llprimitive.cpp b/linden/indra/llprimitive/llprimitive.cpp
index 9ab44f7..1dfc570 100644
--- a/linden/indra/llprimitive/llprimitive.cpp
+++ b/linden/indra/llprimitive/llprimitive.cpp
@@ -107,6 +107,9 @@ const BOOL FLEXIBLE_OBJECT_DEFAULT_USING_COLLISION_SPHERE = FALSE;
107const BOOL FLEXIBLE_OBJECT_DEFAULT_RENDERING_COLLISION_SPHERE = FALSE; 107const BOOL FLEXIBLE_OBJECT_DEFAULT_RENDERING_COLLISION_SPHERE = FALSE;
108 108
109 109
110const char *SCULPT_DEFAULT_TEXTURE = "be293869-d0d9-0a69-5989-ad27f1946fd4"; // old inverted texture: "7595d345-a24c-e7ef-f0bd-78793792133e";
111
112
110//=============================================================== 113//===============================================================
111LLPrimitive::LLPrimitive() 114LLPrimitive::LLPrimitive()
112{ 115{
@@ -511,6 +514,18 @@ S32 LLPrimitive::setTEMediaFlags(const U8 te, const U8 media_flags)
511 return mTextureList[te].setMediaFlags( media_flags ); 514 return mTextureList[te].setMediaFlags( media_flags );
512} 515}
513 516
517S32 LLPrimitive::setTEGlow(const U8 te, const F32 glow)
518{
519 // if we're asking for a non-existent face, return null
520 if (te >= mNumTEs)
521 {
522 llwarns << "setting non-existent te " << te << llendl
523 return 0;
524 }
525
526 return mTextureList[te].setGlow( glow );
527}
528
514 529
515LLPCode LLPrimitive::legacyToPCode(const U8 legacy) 530LLPCode LLPrimitive::legacyToPCode(const U8 legacy)
516{ 531{
@@ -1292,7 +1307,8 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
1292 S16 image_rot[MAX_TES]; 1307 S16 image_rot[MAX_TES];
1293 U8 bump[MAX_TES]; 1308 U8 bump[MAX_TES];
1294 U8 media_flags[MAX_TES]; 1309 U8 media_flags[MAX_TES];
1295 1310 U8 glow[MAX_TES];
1311
1296 const U32 MAX_TE_BUFFER = 4096; 1312 const U32 MAX_TE_BUFFER = 4096;
1297 U8 packed_buffer[MAX_TE_BUFFER]; 1313 U8 packed_buffer[MAX_TE_BUFFER];
1298 U8 *cur_ptr = packed_buffer; 1314 U8 *cur_ptr = packed_buffer;
@@ -1328,7 +1344,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
1328 image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); 1344 image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF));
1329 bump[face_index] = te->getBumpShinyFullbright(); 1345 bump[face_index] = te->getBumpShinyFullbright();
1330 media_flags[face_index] = te->getMediaTexGen(); 1346 media_flags[face_index] = te->getMediaTexGen();
1331// llinfos << "BUMP pack [" << (S32)face_index << "]=" << (S32) bump[face_index] << llendl; 1347 glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
1332 } 1348 }
1333 1349
1334 cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID); 1350 cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID);
@@ -1348,6 +1364,8 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
1348 cur_ptr += packTEField(cur_ptr, (U8 *)bump, 1 ,last_face_index, MVT_U8); 1364 cur_ptr += packTEField(cur_ptr, (U8 *)bump, 1 ,last_face_index, MVT_U8);
1349 *cur_ptr++ = 0; 1365 *cur_ptr++ = 0;
1350 cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8); 1366 cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8);
1367 *cur_ptr++ = 0;
1368 cur_ptr += packTEField(cur_ptr, (U8 *)glow, 1 ,last_face_index, MVT_U8);
1351 } 1369 }
1352 mesgsys->addBinaryDataFast(_PREHASH_TextureEntry, packed_buffer, (S32)(cur_ptr - packed_buffer)); 1370 mesgsys->addBinaryDataFast(_PREHASH_TextureEntry, packed_buffer, (S32)(cur_ptr - packed_buffer));
1353 1371
@@ -1368,7 +1386,8 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
1368 S16 image_rot[MAX_TES]; 1386 S16 image_rot[MAX_TES];
1369 U8 bump[MAX_TES]; 1387 U8 bump[MAX_TES];
1370 U8 media_flags[MAX_TES]; 1388 U8 media_flags[MAX_TES];
1371 1389 U8 glow[MAX_TES];
1390
1372 const U32 MAX_TE_BUFFER = 4096; 1391 const U32 MAX_TE_BUFFER = 4096;
1373 U8 packed_buffer[MAX_TE_BUFFER]; 1392 U8 packed_buffer[MAX_TE_BUFFER];
1374 U8 *cur_ptr = packed_buffer; 1393 U8 *cur_ptr = packed_buffer;
@@ -1404,8 +1423,7 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
1404 image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF)); 1423 image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * (F32)0x7FFF));
1405 bump[face_index] = te->getBumpShinyFullbright(); 1424 bump[face_index] = te->getBumpShinyFullbright();
1406 media_flags[face_index] = te->getMediaTexGen(); 1425 media_flags[face_index] = te->getMediaTexGen();
1407 1426 glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
1408// llinfos << "BUMP pack (Datapacker) [" << (S32)face_index << "]=" << (S32) bump[face_index] << llendl;
1409 } 1427 }
1410 1428
1411 cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID); 1429 cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID);
@@ -1425,6 +1443,8 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
1425 cur_ptr += packTEField(cur_ptr, (U8 *)bump, 1 ,last_face_index, MVT_U8); 1443 cur_ptr += packTEField(cur_ptr, (U8 *)bump, 1 ,last_face_index, MVT_U8);
1426 *cur_ptr++ = 0; 1444 *cur_ptr++ = 0;
1427 cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8); 1445 cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8);
1446 *cur_ptr++ = 0;
1447 cur_ptr += packTEField(cur_ptr, (U8 *)glow, 1 ,last_face_index, MVT_U8);
1428 } 1448 }
1429 1449
1430 dp.packBinaryData(packed_buffer, (S32)(cur_ptr - packed_buffer), "TextureEntry"); 1450 dp.packBinaryData(packed_buffer, (S32)(cur_ptr - packed_buffer), "TextureEntry");
@@ -1453,7 +1473,8 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con
1453 S16 image_rot[MAX_TES]; 1473 S16 image_rot[MAX_TES];
1454 U8 bump[MAX_TES]; 1474 U8 bump[MAX_TES];
1455 U8 media_flags[MAX_TES]; 1475 U8 media_flags[MAX_TES];
1456 1476 U8 glow[MAX_TES];
1477
1457 const U32 MAX_TE_BUFFER = 4096; 1478 const U32 MAX_TE_BUFFER = 4096;
1458 U8 packed_buffer[MAX_TE_BUFFER]; 1479 U8 packed_buffer[MAX_TE_BUFFER];
1459 U8 *cur_ptr = packed_buffer; 1480 U8 *cur_ptr = packed_buffer;
@@ -1503,7 +1524,9 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con
1503 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8); 1524 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8);
1504 cur_ptr++; 1525 cur_ptr++;
1505 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8); 1526 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8);
1506 1527 cur_ptr++;
1528 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8);
1529
1507 LLColor4 color; 1530 LLColor4 color;
1508 LLColor4U coloru; 1531 LLColor4U coloru;
1509 for (U32 i = 0; i < face_count; i++) 1532 for (U32 i = 0; i < face_count; i++)
@@ -1514,6 +1537,7 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, con
1514 retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI); 1537 retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI);
1515 retval |= setTEBumpShinyFullbright(i, bump[i]); 1538 retval |= setTEBumpShinyFullbright(i, bump[i]);
1516 retval |= setTEMediaTexGen(i, media_flags[i]); 1539 retval |= setTEMediaTexGen(i, media_flags[i]);
1540 retval |= setTEGlow(i, (F32)glow[i] / (F32)0xFF);
1517 coloru = LLColor4U(colors + 4*i); 1541 coloru = LLColor4U(colors + 4*i);
1518 1542
1519 // Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f) 1543 // Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
@@ -1548,6 +1572,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
1548 S16 image_rot[MAX_TES]; 1572 S16 image_rot[MAX_TES];
1549 U8 bump[MAX_TES]; 1573 U8 bump[MAX_TES];
1550 U8 media_flags[MAX_TES]; 1574 U8 media_flags[MAX_TES];
1575 U8 glow[MAX_TES];
1551 1576
1552 const U32 MAX_TE_BUFFER = 4096; 1577 const U32 MAX_TE_BUFFER = 4096;
1553 U8 packed_buffer[MAX_TE_BUFFER]; 1578 U8 packed_buffer[MAX_TE_BUFFER];
@@ -1588,10 +1613,11 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
1588 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8); 1613 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8);
1589 cur_ptr++; 1614 cur_ptr++;
1590 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8); 1615 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8);
1616 cur_ptr++;
1617 cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8);
1591 1618
1592 for (i = 0; i < face_count; i++) 1619 for (i = 0; i < face_count; i++)
1593 { 1620 {
1594// llinfos << "BUMP unpack (Datapacker) [" << i << "]=" << S32(bump[i]) <<llendl;
1595 memcpy(image_ids[i].mData,&image_data[i*16],16); /* Flawfinder: ignore */ 1621 memcpy(image_ids[i].mData,&image_data[i*16],16); /* Flawfinder: ignore */
1596 } 1622 }
1597 1623
@@ -1605,6 +1631,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
1605 retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI); 1631 retval |= setTERotation(i, ((F32)image_rot[i]/ (F32)0x7FFF) * F_TWO_PI);
1606 retval |= setTEBumpShinyFullbright(i, bump[i]); 1632 retval |= setTEBumpShinyFullbright(i, bump[i]);
1607 retval |= setTEMediaTexGen(i, media_flags[i]); 1633 retval |= setTEMediaTexGen(i, media_flags[i]);
1634 retval |= setTEGlow(i, (F32)glow[i] / (F32)0xFF);
1608 coloru = LLColor4U(colors + 4*i); 1635 coloru = LLColor4U(colors + 4*i);
1609 1636
1610 // Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f) 1637 // Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
@@ -1641,6 +1668,8 @@ BOOL LLNetworkData::isValid(U16 param_type, U32 size)
1641 return (size == 16); 1668 return (size == 16);
1642 case PARAMS_LIGHT: 1669 case PARAMS_LIGHT:
1643 return (size == 16); 1670 return (size == 16);
1671 case PARAMS_SCULPT:
1672 return (size == 17);
1644 } 1673 }
1645 1674
1646 return FALSE; 1675 return FALSE;
@@ -1796,3 +1825,55 @@ void LLFlexibleObjectData::copy(const LLNetworkData& data)
1796 //mUsingCollisionSphere = flex_data->mUsingCollisionSphere; 1825 //mUsingCollisionSphere = flex_data->mUsingCollisionSphere;
1797 //mRenderingCollisionSphere = flex_data->mRenderingCollisionSphere; 1826 //mRenderingCollisionSphere = flex_data->mRenderingCollisionSphere;
1798} 1827}
1828
1829
1830//============================================================================
1831
1832LLSculptParams::LLSculptParams()
1833{
1834 mType = PARAMS_SCULPT;
1835 mSculptTexture.set(SCULPT_DEFAULT_TEXTURE);
1836 mSculptType = LL_SCULPT_TYPE_SPHERE;
1837}
1838
1839BOOL LLSculptParams::pack(LLDataPacker &dp) const
1840{
1841 dp.packUUID(mSculptTexture, "texture");
1842 dp.packU8(mSculptType, "type");
1843
1844 return TRUE;
1845}
1846
1847BOOL LLSculptParams::unpack(LLDataPacker &dp)
1848{
1849 dp.unpackUUID(mSculptTexture, "texture");
1850 dp.unpackU8(mSculptType, "type");
1851
1852 return TRUE;
1853}
1854
1855bool LLSculptParams::operator==(const LLNetworkData& data) const
1856{
1857 if (data.mType != PARAMS_SCULPT)
1858 {
1859 return false;
1860 }
1861
1862 const LLSculptParams *param = (const LLSculptParams*)&data;
1863 if ( (param->mSculptTexture != mSculptTexture) ||
1864 (param->mSculptType != mSculptType) )
1865
1866 {
1867 return false;
1868 }
1869
1870 return true;
1871}
1872
1873void LLSculptParams::copy(const LLNetworkData& data)
1874{
1875 const LLSculptParams *param = (LLSculptParams*)&data;
1876 mSculptTexture = param->mSculptTexture;
1877 mSculptType = param->mSculptType;
1878}
1879
diff --git a/linden/indra/llprimitive/llprimitive.h b/linden/indra/llprimitive/llprimitive.h
index 89e6623..29cd09f 100644
--- a/linden/indra/llprimitive/llprimitive.h
+++ b/linden/indra/llprimitive/llprimitive.h
@@ -88,6 +88,7 @@ extern const F32 OBJECT_REV_MIN;
88extern const F32 OBJECT_REV_MAX; 88extern const F32 OBJECT_REV_MAX;
89extern const F32 OBJECT_REV_INC; 89extern const F32 OBJECT_REV_INC;
90 90
91extern const char *SCULPT_DEFAULT_TEXTURE;
91 92
92//============================================================================ 93//============================================================================
93 94
@@ -99,7 +100,8 @@ public:
99 enum 100 enum
100 { 101 {
101 PARAMS_FLEXIBLE = 0x10, 102 PARAMS_FLEXIBLE = 0x10,
102 PARAMS_LIGHT = 0x20 103 PARAMS_LIGHT = 0x20,
104 PARAMS_SCULPT = 0x30
103 }; 105 };
104 106
105public: 107public:
@@ -226,6 +228,29 @@ public:
226 void copy(const LLNetworkData& data); 228 void copy(const LLNetworkData& data);
227};// end of attributes structure 229};// end of attributes structure
228 230
231
232
233class LLSculptParams : public LLNetworkData
234{
235protected:
236 LLUUID mSculptTexture;
237 U8 mSculptType;
238
239public:
240 LLSculptParams();
241 /*virtual*/ BOOL pack(LLDataPacker &dp) const;
242 /*virtual*/ BOOL unpack(LLDataPacker &dp);
243 /*virtual*/ bool operator==(const LLNetworkData& data) const;
244 /*virtual*/ void copy(const LLNetworkData& data);
245
246 void setSculptTexture(const LLUUID& id) { mSculptTexture = id; }
247 LLUUID getSculptTexture() { return mSculptTexture; }
248 void setSculptType(U8 type) { mSculptType = type; }
249 U8 getSculptType() { return mSculptType; }
250};
251
252
253
229class LLPrimitive : public LLXform 254class LLPrimitive : public LLXform
230{ 255{
231public: 256public:
@@ -266,6 +291,7 @@ public:
266 virtual S32 setTEShiny(const U8 te, const U8 shiny); 291 virtual S32 setTEShiny(const U8 te, const U8 shiny);
267 virtual S32 setTEFullbright(const U8 te, const U8 fullbright); 292 virtual S32 setTEFullbright(const U8 te, const U8 fullbright);
268 virtual S32 setTEMediaFlags(const U8 te, const U8 flags); 293 virtual S32 setTEMediaFlags(const U8 te, const U8 flags);
294 virtual S32 setTEGlow(const U8 te, const F32 glow);
269 virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed 295 virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed
270 296
271 void setTEArrays(const U8 size, 297 void setTEArrays(const U8 size,
diff --git a/linden/indra/llprimitive/lltextureentry.cpp b/linden/indra/llprimitive/lltextureentry.cpp
index 81bfd6f..4f329f2 100644
--- a/linden/indra/llprimitive/lltextureentry.cpp
+++ b/linden/indra/llprimitive/lltextureentry.cpp
@@ -57,6 +57,7 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs)
57 mColor = rhs.mColor; 57 mColor = rhs.mColor;
58 mBump = rhs.mBump; 58 mBump = rhs.mBump;
59 mMediaFlags = rhs.mMediaFlags; 59 mMediaFlags = rhs.mMediaFlags;
60 mGlow = rhs.mGlow;
60} 61}
61 62
62LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs) 63LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs)
@@ -72,6 +73,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs)
72 mColor = rhs.mColor; 73 mColor = rhs.mColor;
73 mBump = rhs.mBump; 74 mBump = rhs.mBump;
74 mMediaFlags = rhs.mMediaFlags; 75 mMediaFlags = rhs.mMediaFlags;
76 mGlow = rhs.mGlow;
75 } 77 }
76 78
77 return *this; 79 return *this;
@@ -88,7 +90,8 @@ void LLTextureEntry::init(const LLUUID& tex_id, F32 scale_s, F32 scale_t, F32 of
88 mRotation = rotation; 90 mRotation = rotation;
89 mBump = bump; 91 mBump = bump;
90 mMediaFlags = 0x0; 92 mMediaFlags = 0x0;
91 93 mGlow = 0;
94
92 setColor(LLColor4(1.f, 1.f, 1.f, 1.f)); 95 setColor(LLColor4(1.f, 1.f, 1.f, 1.f));
93} 96}
94 97
@@ -366,3 +369,13 @@ S32 LLTextureEntry::setTexGen(U8 tex_gen)
366 return 0; 369 return 0;
367} 370}
368 371
372S32 LLTextureEntry::setGlow(F32 glow)
373{
374 if (mGlow != glow)
375 {
376 mGlow = glow;
377 return TEM_CHANGE_TEXTURE;
378 }
379 return 0;
380}
381
diff --git a/linden/indra/llprimitive/lltextureentry.h b/linden/indra/llprimitive/lltextureentry.h
index 861b585..c1f355b 100644
--- a/linden/indra/llprimitive/lltextureentry.h
+++ b/linden/indra/llprimitive/lltextureentry.h
@@ -107,7 +107,8 @@ public:
107 S32 setMediaFlags(U8 media_flags); 107 S32 setMediaFlags(U8 media_flags);
108 S32 setTexGen(U8 texGen); 108 S32 setTexGen(U8 texGen);
109 S32 setMediaTexGen(U8 media); 109 S32 setMediaTexGen(U8 media);
110 110 S32 setGlow(F32 glow);
111
111 const LLUUID &getID() const { return mID; } 112 const LLUUID &getID() const { return mID; }
112 const LLColor4 &getColor() const { return mColor; } 113 const LLColor4 &getColor() const { return mColor; }
113 void getScale(F32 *s, F32 *t) const { *s = mScaleS; *t = mScaleT; } 114 void getScale(F32 *s, F32 *t) const { *s = mScaleS; *t = mScaleT; }
@@ -124,7 +125,8 @@ public:
124 U8 getMediaFlags() const { return mMediaFlags & TEM_MEDIA_MASK; } 125 U8 getMediaFlags() const { return mMediaFlags & TEM_MEDIA_MASK; }
125 U8 getTexGen() const { return mMediaFlags & TEM_TEX_GEN_MASK; } 126 U8 getTexGen() const { return mMediaFlags & TEM_TEX_GEN_MASK; }
126 U8 getMediaTexGen() const { return mMediaFlags; } 127 U8 getMediaTexGen() const { return mMediaFlags; }
127 128 F32 getGlow() const { return mGlow; }
129
128 // Media flags 130 // Media flags
129 enum { MF_NONE = 0x0, MF_WEB_PAGE = 0x1 }; 131 enum { MF_NONE = 0x0, MF_WEB_PAGE = 0x1 };
130 132
@@ -141,6 +143,8 @@ protected:
141 LLColor4 mColor; 143 LLColor4 mColor;
142 U8 mBump; // Bump map, shiny, and fullbright 144 U8 mBump; // Bump map, shiny, and fullbright
143 U8 mMediaFlags; // replace with web page, movie, etc. 145 U8 mMediaFlags; // replace with web page, movie, etc.
146 F32 mGlow;
147
144}; 148};
145 149
146#endif 150#endif