aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llprimitive/llprimitive.h
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-11-02 21:32:04 -0700
committerMcCabe Maxsted2010-11-02 21:32:04 -0700
commitb5074f1a8e3306f1be9e93172d26c97ff088cea0 (patch)
treea53d5cc54a1f339b7637a9d7d8248eca42995af2 /linden/indra/llprimitive/llprimitive.h
parentRevert "Fix Bug #671 (aka VWR-1603): Duckwalk is too fast" (diff)
parentUploaded the linux64 libraries created by Aleric to imprudenceviewer.org (diff)
downloadmeta-impy-b5074f1a8e3306f1be9e93172d26c97ff088cea0.zip
meta-impy-b5074f1a8e3306f1be9e93172d26c97ff088cea0.tar.gz
meta-impy-b5074f1a8e3306f1be9e93172d26c97ff088cea0.tar.bz2
meta-impy-b5074f1a8e3306f1be9e93172d26c97ff088cea0.tar.xz
Merged webkit_plugins into weekly. Huzzah! The weekly branch now has browser/media plugin support
Diffstat (limited to 'linden/indra/llprimitive/llprimitive.h')
-rwxr-xr-x[-rw-r--r--]linden/indra/llprimitive/llprimitive.h58
1 files changed, 44 insertions, 14 deletions
diff --git a/linden/indra/llprimitive/llprimitive.h b/linden/indra/llprimitive/llprimitive.h
index efabb82..e146fbe 100644..100755
--- a/linden/indra/llprimitive/llprimitive.h
+++ b/linden/indra/llprimitive/llprimitive.h
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2001-2009, Linden Research, Inc. 7 * Copyright (c) 2001-2010, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -37,9 +37,11 @@
37#include "v3math.h" 37#include "v3math.h"
38#include "xform.h" 38#include "xform.h"
39#include "message.h" 39#include "message.h"
40#include "llmemory.h" 40#include "llmemory.h" // not in SG2.0
41//#include "llpointer.h"// instead in SG2.0
41#include "llvolume.h" 42#include "llvolume.h"
42#include "lltextureentry.h" 43#include "lltextureentry.h"
44#include "llprimtexturelist.h"
43 45
44// Moved to stdtypes.h --JC 46// Moved to stdtypes.h --JC
45// typedef U8 LLPCode; 47// typedef U8 LLPCode;
@@ -105,7 +107,8 @@ public:
105 { 107 {
106 PARAMS_FLEXIBLE = 0x10, 108 PARAMS_FLEXIBLE = 0x10,
107 PARAMS_LIGHT = 0x20, 109 PARAMS_LIGHT = 0x20,
108 PARAMS_SCULPT = 0x30 110 PARAMS_SCULPT = 0x30,
111 PARAMS_LIGHT_IMAGE = 0x40,
109 }; 112 };
110 113
111public: 114public:
@@ -260,11 +263,33 @@ public:
260 bool fromLLSD(LLSD& sd); 263 bool fromLLSD(LLSD& sd);
261 264
262 void setSculptTexture(const LLUUID& id) { mSculptTexture = id; } 265 void setSculptTexture(const LLUUID& id) { mSculptTexture = id; }
263 LLUUID getSculptTexture() { return mSculptTexture; } 266 LLUUID getSculptTexture() const { return mSculptTexture; }
264 void setSculptType(U8 type) { mSculptType = type; } 267 void setSculptType(U8 type) { mSculptType = type; }
265 U8 getSculptType() { return mSculptType; } 268 U8 getSculptType() const { return mSculptType; }
266}; 269};
267 270
271class LLLightImageParams : public LLNetworkData
272{
273protected:
274 LLUUID mLightTexture;
275 LLVector3 mParams;
276
277public:
278 LLLightImageParams();
279 /*virtual*/ BOOL pack(LLDataPacker &dp) const;
280 /*virtual*/ BOOL unpack(LLDataPacker &dp);
281 /*virtual*/ bool operator==(const LLNetworkData& data) const;
282 /*virtual*/ void copy(const LLNetworkData& data);
283 LLSD asLLSD() const;
284 operator LLSD() const { return asLLSD(); }
285 bool fromLLSD(LLSD& sd);
286
287 void setLightTexture(const LLUUID& id) { mLightTexture = id; }
288 LLUUID getLightTexture() const { return mLightTexture; }
289 void setParams(const LLVector3& params) { mParams = params; }
290 LLVector3 getParams() const { return mParams; }
291
292};
268 293
269 294
270class LLPrimitive : public LLXform 295class LLPrimitive : public LLXform
@@ -294,6 +319,8 @@ public:
294 LLPrimitive(); 319 LLPrimitive();
295 virtual ~LLPrimitive(); 320 virtual ~LLPrimitive();
296 321
322 void clearTextureList();
323
297 static LLPrimitive *createPrimitive(LLPCode p_code); 324 static LLPrimitive *createPrimitive(LLPCode p_code);
298 void init_primitive(LLPCode p_code); 325 void init_primitive(LLPCode p_code);
299 326
@@ -304,11 +331,11 @@ public:
304 331
305 // Modify texture entry properties 332 // Modify texture entry properties
306 inline BOOL validTE(const U8 te_num) const; 333 inline BOOL validTE(const U8 te_num) const;
307 const LLTextureEntry *getTE(const U8 te_num) const; 334 LLTextureEntry* getTE(const U8 te_num) const;
308 335
309 virtual void setNumTEs(const U8 num_tes); 336 virtual void setNumTEs(const U8 num_tes);
310 virtual void setAllTETextures(const LLUUID &tex_id); 337 virtual void setAllTETextures(const LLUUID &tex_id);
311 virtual void setTE(const U8 index, const LLTextureEntry &te); 338 virtual void setTE(const U8 index, const LLTextureEntry& te);
312 virtual S32 setTEColor(const U8 te, const LLColor4 &color); 339 virtual S32 setTEColor(const U8 te, const LLColor4 &color);
313 virtual S32 setTEColor(const U8 te, const LLColor3 &color); 340 virtual S32 setTEColor(const U8 te, const LLColor3 &color);
314 virtual S32 setTEAlpha(const U8 te, const F32 alpha); 341 virtual S32 setTEAlpha(const U8 te, const F32 alpha);
@@ -331,10 +358,6 @@ public:
331 virtual S32 setTEGlow(const U8 te, const F32 glow); 358 virtual S32 setTEGlow(const U8 te, const F32 glow);
332 virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed 359 virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed
333 360
334 void setTEArrays(const U8 size,
335 const LLUUID* image_ids,
336 const F32* scale_s,
337 const F32* scale_t);
338 void copyTEs(const LLPrimitive *primitive); 361 void copyTEs(const LLPrimitive *primitive);
339 S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const; 362 S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const;
340 S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type); 363 S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
@@ -382,14 +405,21 @@ public:
382 const LLVector3& getAngularVelocity() const { return mAngularVelocity; } 405 const LLVector3& getAngularVelocity() const { return mAngularVelocity; }
383 const LLVector3& getVelocity() const { return mVelocity; } 406 const LLVector3& getVelocity() const { return mVelocity; }
384 const LLVector3& getAcceleration() const { return mAcceleration; } 407 const LLVector3& getAcceleration() const { return mAcceleration; }
385 U8 getNumTEs() const { return mNumTEs; } 408 U8 getNumTEs() const { return mTextureList.size(); }
409 U8 getExpectedNumTEs() const;
386 410
387 U8 getMaterial() const { return mMaterial; } 411 U8 getMaterial() const { return mMaterial; }
388 412
389 void setVolumeType(const U8 code); 413 void setVolumeType(const U8 code);
390 U8 getVolumeType(); 414 U8 getVolumeType();
391 415
392 void setTextureList(LLTextureEntry *listp); 416 // clears existing textures
417 // copies the contents of other_list into mEntryList
418 void copyTextureList(const LLPrimTextureList& other_list);
419
420 // clears existing textures
421 // takes the contents of other_list and clears other_list
422 void takeTextureList(LLPrimTextureList& other_list);
393 423
394 inline BOOL isAvatar() const; 424 inline BOOL isAvatar() const;
395 inline BOOL isSittingAvatar() const; 425 inline BOOL isSittingAvatar() const;
@@ -414,7 +444,7 @@ protected:
414 LLVector3 mAcceleration; // are we under constant acceleration? 444 LLVector3 mAcceleration; // are we under constant acceleration?
415 LLVector3 mAngularVelocity; // angular velocity 445 LLVector3 mAngularVelocity; // angular velocity
416 LLPointer<LLVolume> mVolumep; 446 LLPointer<LLVolume> mVolumep;
417 LLTextureEntry *mTextureList; // list of texture GUIDs, scales, offsets 447 LLPrimTextureList mTextureList; // list of texture GUIDs, scales, offsets
418 U8 mMaterial; // Material code 448 U8 mMaterial; // Material code
419 U8 mNumTEs; // # of faces on the primitve 449 U8 mNumTEs; // # of faces on the primitve
420 U32 mMiscFlags; // home for misc bools 450 U32 mMiscFlags; // home for misc bools