summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2008-05-19 17:02:33 +0000
committerDon Kjer <don@lindenlab.com>2008-05-19 17:02:33 +0000
commit38558960978a0741dd9c79c4c7a108b8a1f99eff (patch)
treeb7221183a7c91c1097a78cf5875197431852b0b8 /indra/llmath
parente77de5d685ae441f72920f0e04d9887ee958745a (diff)
EFFECTIVE MERGES:
svn merge -r 79616:82632 svn+ssh://svn/svn/linden/branches/maintenance/maintenance-7 into release svn merge -r 83211:87215 svn+ssh://svn/svn/linden/branches/php-framework-3 into release ACTUAL MERGE: svn merge -r 87631:87698 svn+ssh://svn/svn/linden/qa/combo-merge-maintenance-7-php-framework-3 into release dataserver-is-deprecated
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llcamera.h5
-rw-r--r--indra/llmath/llvolume.h69
2 files changed, 48 insertions, 26 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.h b/indra/llmath/llvolume.h
index 4bc8495ad3..c395ed7378 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -189,15 +189,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)
{
}
@@ -222,6 +227,7 @@ public:
temp_f32 = 1.f;
}
mHollow = temp_f32;
+ mCRC = 0;
}
bool operator==(const LLProfileParams &params) const;
@@ -309,27 +315,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)
@@ -347,6 +362,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 &params) const;
@@ -525,6 +542,7 @@ class LLVolumeParams
{
public:
LLVolumeParams()
+ : mSculptType(LL_SCULPT_TYPE_NONE)
{
}
@@ -649,7 +667,9 @@ public:
mConcave(FALSE),
mDirty(TRUE),
mTotalOut(0),
- mTotal(2)
+ mTotal(2),
+ mMinX(0.f),
+ mMaxX(0.f)
{
}
@@ -678,8 +698,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);
@@ -698,6 +716,9 @@ protected:
S32 mTotalOut;
S32 mTotal;
+
+ F32 mMaxX;
+ F32 mMinX;
};
//-------------------------------------------------------------------