aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldrawable.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/lldrawable.h
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lldrawable.h36
1 files changed, 24 insertions, 12 deletions
diff --git a/linden/indra/newview/lldrawable.h b/linden/indra/newview/lldrawable.h
index 062427e..6ff4d1e 100644
--- a/linden/indra/newview/lldrawable.h
+++ b/linden/indra/newview/lldrawable.h
@@ -38,8 +38,8 @@
38#include "v4coloru.h" 38#include "v4coloru.h"
39#include "llquaternion.h" 39#include "llquaternion.h"
40#include "xform.h" 40#include "xform.h"
41#include "llmemtype.h"
41#include "llprimitive.h" 42#include "llprimitive.h"
42#include "llviewerimage.h"
43#include "lldarray.h" 43#include "lldarray.h"
44#include "llstat.h" 44#include "llstat.h"
45#include "llviewerobject.h" 45#include "llviewerobject.h"
@@ -52,6 +52,7 @@ class LLSpatialGroup;
52class LLSpatialBridge; 52class LLSpatialBridge;
53class LLSpatialPartition; 53class LLSpatialPartition;
54class LLVOVolume; 54class LLVOVolume;
55class LLViewerImage;
55 56
56extern F32 gFrameTimeSeconds; 57extern F32 gFrameTimeSeconds;
57 58
@@ -74,7 +75,7 @@ public:
74 75
75 BOOL isLight() const; 76 BOOL isLight() const;
76 77
77 BOOL isVisible() const { return (mVisible == sCurVisible); } 78 BOOL isVisible() const;
78 virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, BOOL for_select = FALSE); 79 virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, BOOL for_select = FALSE);
79 80
80 81
@@ -121,10 +122,11 @@ public:
121 inline S32 getNumFaces() const; 122 inline S32 getNumFaces() const;
122 123
123 //void removeFace(const S32 i); // SJB: Avoid using this, it's slow 124 //void removeFace(const S32 i); // SJB: Avoid using this, it's slow
124 LLFace* addFace(LLDrawPool *poolp, LLViewerImage *texturep, const BOOL shared_geom = FALSE); 125 LLFace* addFace(LLFacePool *poolp, LLViewerImage *texturep);
126 LLFace* addFace(const LLTextureEntry *te, LLViewerImage *texturep);
125 void deleteFaces(S32 offset, S32 count); 127 void deleteFaces(S32 offset, S32 count);
126 void setNumFaces(const S32 numFaces, LLDrawPool *poolp, LLViewerImage *texturep); 128 void setNumFaces(const S32 numFaces, LLFacePool *poolp, LLViewerImage *texturep);
127 void setNumFacesFast(const S32 numFaces, LLDrawPool *poolp, LLViewerImage *texturep); 129 void setNumFacesFast(const S32 numFaces, LLFacePool *poolp, LLViewerImage *texturep);
128 void mergeFaces(LLDrawable* src); 130 void mergeFaces(LLDrawable* src);
129 131
130 void init(); 132 void init();
@@ -138,6 +140,8 @@ public:
138 140
139 BOOL isActive() const { return isState(ACTIVE); } 141 BOOL isActive() const { return isState(ACTIVE); }
140 BOOL isStatic() const { return !isActive(); } 142 BOOL isStatic() const { return !isActive(); }
143 BOOL isAnimating() const;
144
141 virtual BOOL updateMove(); 145 virtual BOOL updateMove();
142 virtual void movePartition(); 146 virtual void movePartition();
143 147
@@ -146,6 +150,7 @@ public:
146 virtual void updateDistance(LLCamera& camera); 150 virtual void updateDistance(LLCamera& camera);
147 BOOL updateGeometry(BOOL priority); 151 BOOL updateGeometry(BOOL priority);
148 BOOL updateLighting(BOOL priority); 152 BOOL updateLighting(BOOL priority);
153 void updateFaceSize(S32 idx);
149 void updateLightSet(); 154 void updateLightSet();
150 155
151 F32 getSunShadowFactor() const { return mSunShadowFactor; } 156 F32 getSunShadowFactor() const { return mSunShadowFactor; }
@@ -195,6 +200,7 @@ public:
195protected: 200protected:
196 virtual ~LLDrawable() { destroy(); } 201 virtual ~LLDrawable() { destroy(); }
197 void moveUpdatePipeline(BOOL moved); 202 void moveUpdatePipeline(BOOL moved);
203 void updatePartition();
198 BOOL updateMoveDamped(); 204 BOOL updateMoveDamped();
199 BOOL updateMoveUndamped(); 205 BOOL updateMoveUndamped();
200 206
@@ -206,6 +212,7 @@ public:
206 typedef std::set<LLPointer<LLDrawable> > drawable_set_t; 212 typedef std::set<LLPointer<LLDrawable> > drawable_set_t;
207 typedef std::vector<LLPointer<LLDrawable> > drawable_vector_t; 213 typedef std::vector<LLPointer<LLDrawable> > drawable_vector_t;
208 typedef std::list<LLPointer<LLDrawable> > drawable_list_t; 214 typedef std::list<LLPointer<LLDrawable> > drawable_list_t;
215 typedef std::queue<LLPointer<LLDrawable> > drawable_queue_t;
209 216
210 struct CompareDistanceGreater 217 struct CompareDistanceGreater
211 { 218 {
@@ -246,11 +253,14 @@ public:
246 UNLIT = 0x00000200, 253 UNLIT = 0x00000200,
247 LIGHT = 0x00000400, 254 LIGHT = 0x00000400,
248 LIGHTING_BUILT = 0x00000800, 255 LIGHTING_BUILT = 0x00000800,
249 REBUILD_VOLUME = 0x00001000, 256 REBUILD_VOLUME = 0x00001000, //volume changed LOD or parameters, or vertex buffer changed
250 REBUILD_TCOORD = 0x00002000, 257 REBUILD_TCOORD = 0x00002000, //texture coordinates changed
251 REBUILD_GEOMETRY= REBUILD_VOLUME|REBUILD_TCOORD, 258 REBUILD_COLOR = 0x00004000, //color changed
252 REBUILD_LIGHTING= 0x00008000, 259 REBUILD_LIGHTING= 0x00008000, //lighting information changed
253 REBUILD_ALL = REBUILD_GEOMETRY|REBUILD_LIGHTING, 260 REBUILD_POSITION= 0x00010000, //vertex positions/normals changed
261 REBUILD_GEOMETRY= REBUILD_POSITION|REBUILD_TCOORD|REBUILD_COLOR,
262 REBUILD_MATERIAL= REBUILD_TCOORD|REBUILD_COLOR,
263 REBUILD_ALL = REBUILD_GEOMETRY|REBUILD_LIGHTING|REBUILD_VOLUME,
254 ON_SHIFT_LIST = 0x00100000, 264 ON_SHIFT_LIST = 0x00100000,
255// NO_INTERP_COLOR = 0x00200000, 265// NO_INTERP_COLOR = 0x00200000,
256 BLOCKER = 0x00400000, 266 BLOCKER = 0x00400000,
@@ -285,6 +295,8 @@ public:
285 void setSpatialBridge(LLSpatialBridge* bridge) { mSpatialBridge = (LLDrawable*) bridge; } 295 void setSpatialBridge(LLSpatialBridge* bridge) { mSpatialBridge = (LLDrawable*) bridge; }
286 LLSpatialBridge* getSpatialBridge() { return (LLSpatialBridge*) (LLDrawable*) mSpatialBridge; } 296 LLSpatialBridge* getSpatialBridge() { return (LLSpatialBridge*) (LLDrawable*) mSpatialBridge; }
287 297
298 static F32 sCurPixelAngle; //current pixels per radian
299
288protected: 300protected:
289 typedef std::vector<LLFace*> face_list_t; 301 typedef std::vector<LLFace*> face_list_t;
290 302
@@ -296,7 +308,7 @@ protected:
296 LLPointer<LLDrawable> mSpatialBridge; 308 LLPointer<LLDrawable> mSpatialBridge;
297 S32 mSpatialGroupOffset; 309 S32 mSpatialGroupOffset;
298 310
299 U32 mVisible; 311 mutable U32 mVisible;
300 F32 mRadius; 312 F32 mRadius;
301 LLVector3 mExtents[2]; 313 LLVector3 mExtents[2];
302 LLVector3d mPositionGroup; 314 LLVector3d mPositionGroup;
@@ -308,7 +320,6 @@ protected:
308 LLVector3 mCurrentScale; 320 LLVector3 mCurrentScale;
309 321
310 static U32 sCurVisible; // Counter for what value of mVisible means currently visible 322 static U32 sCurVisible; // Counter for what value of mVisible means currently visible
311 static F32 sCurPixelAngle; //current pixels per radian
312 323
313 static U32 sNumZombieDrawables; 324 static U32 sNumZombieDrawables;
314 static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList; 325 static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList;
@@ -318,6 +329,7 @@ protected:
318inline LLFace* LLDrawable::getFace(const S32 i) const 329inline LLFace* LLDrawable::getFace(const S32 i) const
319{ 330{
320 llassert((U32)i < mFaces.size()); 331 llassert((U32)i < mFaces.size());
332 llassert(mFaces[i]);
321 return mFaces[i]; 333 return mFaces[i];
322} 334}
323 335