summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-07-24 10:51:37 -0400
committerOz Linden <oz@lindenlab.com>2012-07-24 10:51:37 -0400
commit8df36196215131cbac961f47bfbd4a1b925548cb (patch)
tree35fe890f1f2e47c9acd0d411925897ee7e3794d6 /indra/newview/lldrawable.h
parent4feef5af63f6294249aa50e37fba712cd9ddec91 (diff)
parentd7015a2b9b55907c8447d0051cf5d7ac862aebf7 (diff)
merge to viewer-developmento
Diffstat (limited to 'indra/newview/lldrawable.h')
-rw-r--r--indra/newview/lldrawable.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index e2064b79f8..960c64fa9e 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -59,6 +59,7 @@ class LLViewerTexture;
const U32 SILHOUETTE_HIGHLIGHT = 0;
// All data for new renderer goes into this class.
+LL_ALIGN_PREFIX(16)
class LLDrawable : public LLRefCount
{
public:
@@ -75,6 +76,16 @@ public:
static void initClass();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
LLDrawable() { init(); }
MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE);
@@ -109,6 +120,9 @@ public:
F32 getIntensity() const { return llmin(mXform.getScale().mV[0], 4.f); }
S32 getLOD() const { return mVObjp ? mVObjp->getLOD() : 1; }
F32 getBinRadius() const { return mBinRadius; }
+ S32 getBinIndex() const { return mBinIndex; }
+ void setBinIndex(S32 index) const { mBinIndex = index; }
+
void getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); }
LLXformMatrix* getXform() { return &mXform; }
@@ -194,7 +208,7 @@ public:
S32 findReferences(LLDrawable *drawablep); // Not const because of @#$! iterators...
void setSpatialGroup(LLSpatialGroup *groupp);
- LLSpatialGroup *getSpatialGroup() const { return mSpatialGroupp; }
+ LLSpatialGroup *getSpatialGroup() const;
LLSpatialPartition* getSpatialPartition();
// Statics
@@ -281,8 +295,8 @@ public:
} EDrawableFlags;
private: //aligned members
- LLVector4a mExtents[2];
- LLVector4a mPositionGroup;
+ LL_ALIGN_16(LLVector4a mExtents[2]);
+ LL_ALIGN_16(LLVector4a mPositionGroup);
public:
LLXformMatrix mXform;
@@ -315,6 +329,7 @@ private:
mutable U32 mVisible;
F32 mRadius;
F32 mBinRadius;
+ mutable S32 mBinIndex;
S32 mGeneration;
LLVector3 mCurrentScale;
@@ -323,7 +338,7 @@ private:
static U32 sNumZombieDrawables;
static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList;
-};
+} LL_ALIGN_POSTFIX(16);
inline LLFace* LLDrawable::getFace(const S32 i) const