diff options
author | Brian McGroarty <soft@lindenlab.com> | 2008-05-07 17:17:42 +0000 |
---|---|---|
committer | Brian McGroarty <soft@lindenlab.com> | 2008-05-07 17:17:42 +0000 |
commit | e1e1212daae33723e7da325f295a5c3a6bb78979 (patch) | |
tree | 95139904e71995519db2fc6e056940b2f40e73a3 /indra/llmath | |
parent | 41927004751731d2d0cb74989ded36878292ee4e (diff) |
QAR-520 maintenance-7 merge -- svn merge -r 84923:86093 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-7-sandbox-84884 -- dataserver-is-deprecated
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llcamera.h | 5 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 12 | ||||
-rw-r--r-- | indra/llmath/llvolume.h | 69 |
3 files changed, 54 insertions, 32 deletions
diff --git a/indra/llmath/llcamera.h b/indra/llmath/llcamera.h index bd894753f8..82c712e5e7 100644 --- a/indra/llmath/llcamera.h +++ b/indra/llmath/llcamera.h @@ -115,11 +115,12 @@ protected: LLPlane mWorldPlanes[PLANE_NUM]; LLPlane mHorizPlanes[HORIZ_PLANE_NUM]; - typedef struct + struct frustum_plane { + frustum_plane() : mask(0) {} LLPlane p; U8 mask; - } frustum_plane; + }; frustum_plane mAgentPlanes[7]; //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP U32 mPlaneCount; //defaults to 6, if setUserClipPlane is called, uses user supplied clip plane in diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index f4052f336f..6b8e7ad4c6 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -4182,13 +4182,13 @@ std::ostream& operator<<(std::ostream &s, const LLVolume *volumep) LLVolumeFace::LLVolumeFace() + : mID(0), + mTypeMask(0), + mBeginS(0), + mBeginT(0), + mNumS(0), + mNumT(0) { - mTypeMask = 0; - mID = 0; - mBeginS = 0; - mBeginT = 0; - mNumS = 0; - mNumT = 0; mHasBinormals = FALSE; } diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 11a7c2f1c6..6154695e36 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -188,15 +188,20 @@ class LLProfileParams { public: LLProfileParams() + : mCurveType(LL_PCODE_PROFILE_SQUARE), + mBegin(0.f), + mEnd(1.f), + mHollow(0.f), + mCRC(0) { - mCurveType = LL_PCODE_PROFILE_SQUARE; - mBegin = 0.f; - mEnd = 1.f; - mHollow = 0.f; } LLProfileParams(U8 curve, F32 begin, F32 end, F32 hollow) - : mCurveType(curve), mBegin(begin), mEnd(end), mHollow(hollow) + : mCurveType(curve), + mBegin(begin), + mEnd(end), + mHollow(hollow), + mCRC(0) { } @@ -221,6 +226,7 @@ public: temp_f32 = 1.f; } mHollow = temp_f32; + mCRC = 0; } bool operator==(const LLProfileParams ¶ms) const; @@ -308,27 +314,36 @@ class LLPathParams { public: LLPathParams() + : + mCurveType(LL_PCODE_PATH_LINE), + mBegin(0.f), + mEnd(1.f), + mScale(1.f,1.f), + mShear(0.f,0.f), + mTwistBegin(0.f), + mTwistEnd(0.f), + mRadiusOffset(0.f), + mTaper(0.f,0.f), + mRevolutions(1.f), + mSkew(0.f), + mCRC(0) { - mBegin = 0.f; - mEnd = 1.f; - mScale.setVec(1.f,1.f); - mShear.setVec(0.f,0.f); - mCurveType = LL_PCODE_PATH_LINE; - mTwistBegin = 0.f; - mTwistEnd = 0.f; - mRadiusOffset = 0.f; - mTaper.setVec(0.f,0.f); - mRevolutions = 1.f; - mSkew = 0.f; } LLPathParams(U8 curve, F32 begin, F32 end, F32 scx, F32 scy, F32 shx, F32 shy, F32 twistend, F32 twistbegin, F32 radiusoffset, F32 tx, F32 ty, F32 revolutions, F32 skew) - : mCurveType(curve), mBegin(begin), mEnd(end), mTwistBegin(twistbegin), mTwistEnd(twistend), - mRadiusOffset(radiusoffset), mRevolutions(revolutions), mSkew(skew) + : mCurveType(curve), + mBegin(begin), + mEnd(end), + mScale(scx,scy), + mShear(shx,shy), + mTwistBegin(twistbegin), + mTwistEnd(twistend), + mRadiusOffset(radiusoffset), + mTaper(tx,ty), + mRevolutions(revolutions), + mSkew(skew), + mCRC(0) { - mScale.setVec(scx,scy); - mShear.setVec(shx,shy); - mTaper.setVec(tx,ty); } LLPathParams(U8 curve, U16 begin, U16 end, U8 scx, U8 scy, U8 shx, U8 shy, U8 twistend, U8 twistbegin, U8 radiusoffset, U8 tx, U8 ty, U8 revolutions, U8 skew) @@ -346,6 +361,8 @@ public: mTaper.setVec(U8_TO_F32(tx) * TAPER_QUANTA,U8_TO_F32(ty) * TAPER_QUANTA); mRevolutions = ((F32)revolutions) * REV_QUANTA + 1.0f; mSkew = U8_TO_F32(skew) * SCALE_QUANTA; + + mCRC = 0; } bool operator==(const LLPathParams ¶ms) const; @@ -524,6 +541,7 @@ class LLVolumeParams { public: LLVolumeParams() + : mSculptType(LL_SCULPT_TYPE_NONE) { } @@ -648,7 +666,9 @@ public: mConcave(FALSE), mDirty(TRUE), mTotalOut(0), - mTotal(2) + mTotal(2), + mMinX(0.f), + mMaxX(0.f) { } @@ -677,8 +697,6 @@ public: std::vector<Face> mFaces; std::vector<LLVector3> mEdgeNormals; std::vector<LLVector3> mEdgeCenters; - F32 mMaxX; - F32 mMinX; friend std::ostream& operator<<(std::ostream &s, const LLProfile &profile); @@ -697,6 +715,9 @@ protected: S32 mTotalOut; S32 mTotal; + + F32 mMaxX; + F32 mMinX; }; //------------------------------------------------------------------- |