diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawable.cpp | 19 | ||||
-rw-r--r-- | indra/newview/lldrawable.h | 10 | ||||
-rw-r--r-- | indra/newview/llface.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llface.h | 5 |
4 files changed, 16 insertions, 23 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 5b5efdeabf..086702de87 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -89,9 +89,6 @@ void LLDrawable::incrementVisible() void LLDrawable::init() { - mExtents = (LLVector4a*) ll_aligned_malloc_32(sizeof(LLVector4a)*3); - mPositionGroup = mExtents + 2; - // mXform mParent = NULL; mRenderType = 0; @@ -144,8 +141,6 @@ void LLDrawable::destroy() llinfos << "- Zombie drawables: " << sNumZombieDrawables << llendl; }*/ - ll_aligned_free_32(mExtents); - mExtents = mPositionGroup = NULL; } void LLDrawable::markDead() @@ -836,7 +831,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) mExtents[0].add(shift_vector); mExtents[1].add(shift_vector); - mPositionGroup->add(shift_vector); + mPositionGroup.add(shift_vector); } else if (mSpatialBridge) { @@ -846,7 +841,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) { mExtents[0].add(shift_vector); mExtents[1].add(shift_vector); - mPositionGroup->add(shift_vector); + mPositionGroup.add(shift_vector); } mVObjp->onShift(shift_vector); @@ -877,7 +872,7 @@ void LLDrawable::setSpatialExtents(const LLVector4a& min, const LLVector4a& max) void LLDrawable::setPositionGroup(const LLVector4a& pos) { - *mPositionGroup = pos; + mPositionGroup = pos; } void LLDrawable::updateSpatialExtents() @@ -891,7 +886,7 @@ void LLDrawable::updateSpatialExtents() if (mSpatialBridge.notNull()) { - mPositionGroup->splat(0.f); + mPositionGroup.splat(0.f); } } @@ -1160,8 +1155,8 @@ void LLSpatialBridge::updateSpatialExtents() diagonal.setSub(newMax, newMin); mRadius = diagonal.getLength3().getF32() * 0.5f; - mPositionGroup->setAdd(newMin,newMax); - mPositionGroup->mul(0.5f); + mPositionGroup.setAdd(newMin,newMax); + mPositionGroup.mul(0.5f); updateBinRadius(); } @@ -1430,7 +1425,7 @@ void LLSpatialBridge::shiftPos(const LLVector4a& vec) { mExtents[0].add(vec); mExtents[1].add(vec); - mPositionGroup->add(vec); + mPositionGroup.add(vec); } void LLSpatialBridge::cleanupReferences() diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 92d964e0ab..9ebe1a45b4 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -101,7 +101,7 @@ public: const LLVector3& getPosition() const { return mXform.getPosition(); } const LLVector3& getWorldPosition() const { return mXform.getPositionW(); } const LLVector3 getPositionAgent() const; - const LLVector4a& getPositionGroup() const { return *mPositionGroup; } + const LLVector4a& getPositionGroup() const { return mPositionGroup; } const LLVector3& getScale() const { return mCurrentScale; } void setScale(const LLVector3& scale) { mCurrentScale = scale; } const LLQuaternion& getWorldRotation() const { return mXform.getWorldRotation(); } @@ -278,6 +278,11 @@ public: RIGGED = 0x08000000, } EDrawableFlags; +private: //aligned members + LLVector4a mExtents[2]; + LLVector4a mPositionGroup; + +public: LLXformMatrix mXform; // vis data @@ -298,9 +303,6 @@ public: private: typedef std::vector<LLFace*> face_list_t; - LLVector4a* mExtents; - LLVector4a* mPositionGroup; - U32 mState; S32 mRenderType; LLPointer<LLViewerObject> mVObjp; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index f5a04c8c81..b0e70b9402 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -146,8 +146,6 @@ void cylindricalProjection(LLVector2 &tc, const LLVector4a& normal, const LLVect void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) { - mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*2); - mLastUpdateTime = gFrameTimeSeconds; mLastMoveTime = 0.f; mLastSkinTime = gFrameTimeSeconds; @@ -239,9 +237,6 @@ void LLFace::destroy() mDrawablep = NULL; mVObjp = NULL; - - ll_aligned_free_16(mExtents); - mExtents = NULL; } diff --git a/indra/newview/llface.h b/indra/newview/llface.h index dec0d48f61..eea481fdca 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -219,6 +219,9 @@ public: void removeAtlas() ; BOOL switchTexture() ; +public: //aligned members + LLVector4a mExtents[2]; + private: F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ); BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; @@ -231,8 +234,6 @@ public: LLVector3 mCenterLocal; LLVector3 mCenterAgent; - LLVector4a* mExtents; - LLVector2 mTexExtents[2]; F32 mDistance; LLPointer<LLVertexBuffer> mVertexBuffer; |