summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llcamera.h5
-rw-r--r--indra/llmath/llvolume.cpp12
-rw-r--r--indra/llmath/llvolume.h69
3 files changed, 32 insertions, 54 deletions
diff --git a/indra/llmath/llcamera.h b/indra/llmath/llcamera.h
index 82c712e5e7..bd894753f8 100644
--- a/indra/llmath/llcamera.h
+++ b/indra/llmath/llcamera.h
@@ -115,12 +115,11 @@ protected:
LLPlane mWorldPlanes[PLANE_NUM];
LLPlane mHorizPlanes[HORIZ_PLANE_NUM];
- struct frustum_plane
+ typedef struct
{
- 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 6b8e7ad4c6..f4052f336f 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 6154695e36..11a7c2f1c6 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -188,20 +188,15 @@ 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),
- mCRC(0)
+ : mCurveType(curve), mBegin(begin), mEnd(end), mHollow(hollow)
{
}
@@ -226,7 +221,6 @@ public:
temp_f32 = 1.f;
}
mHollow = temp_f32;
- mCRC = 0;
}
bool operator==(const LLProfileParams &params) const;
@@ -314,36 +308,27 @@ 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),
- mScale(scx,scy),
- mShear(shx,shy),
- mTwistBegin(twistbegin),
- mTwistEnd(twistend),
- mRadiusOffset(radiusoffset),
- mTaper(tx,ty),
- mRevolutions(revolutions),
- mSkew(skew),
- mCRC(0)
+ : mCurveType(curve), mBegin(begin), mEnd(end), mTwistBegin(twistbegin), mTwistEnd(twistend),
+ mRadiusOffset(radiusoffset), mRevolutions(revolutions), mSkew(skew)
{
+ 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)
@@ -361,8 +346,6 @@ 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;
@@ -541,7 +524,6 @@ class LLVolumeParams
{
public:
LLVolumeParams()
- : mSculptType(LL_SCULPT_TYPE_NONE)
{
}
@@ -666,9 +648,7 @@ public:
mConcave(FALSE),
mDirty(TRUE),
mTotalOut(0),
- mTotal(2),
- mMinX(0.f),
- mMaxX(0.f)
+ mTotal(2)
{
}
@@ -697,6 +677,8 @@ 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);
@@ -715,9 +697,6 @@ protected:
S32 mTotalOut;
S32 mTotal;
-
- F32 mMaxX;
- F32 mMinX;
};
//-------------------------------------------------------------------