diff options
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llcamera.cpp | 7 | ||||
-rw-r--r-- | indra/llmath/llinterp.h | 3 | ||||
-rw-r--r-- | indra/llmath/llmath.h | 2 | ||||
-rw-r--r-- | indra/llmath/lloctree.h | 1 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 1 |
5 files changed, 8 insertions, 6 deletions
diff --git a/indra/llmath/llcamera.cpp b/indra/llmath/llcamera.cpp index 21ea4b2e7c..487ed6451f 100644 --- a/indra/llmath/llcamera.cpp +++ b/indra/llmath/llcamera.cpp @@ -45,7 +45,8 @@ LLCamera::LLCamera() : mNearPlane(DEFAULT_NEAR_PLANE), mFarPlane(DEFAULT_FAR_PLANE), mFixedDistance(-1.f), - mPlaneCount(6) + mPlaneCount(6), + mFrustumCornerDist(0.f) { calculateFrustumPlanes(); } @@ -55,7 +56,8 @@ LLCamera::LLCamera(F32 vertical_fov_rads, F32 aspect_ratio, S32 view_height_in_p LLCoordFrame(), mViewHeightInPixels(view_height_in_pixels), mFixedDistance(-1.f), - mPlaneCount(6) + mPlaneCount(6), + mFrustumCornerDist(0.f) { mAspect = llclamp(aspect_ratio, MIN_ASPECT_RATIO, MAX_ASPECT_RATIO); mNearPlane = llclamp(near_plane, MIN_NEAR_PLANE, MAX_NEAR_PLANE); @@ -648,7 +650,6 @@ void LLCamera::ignoreAgentFrustumPlane(S32 idx) void LLCamera::calcAgentFrustumPlanes(LLVector3* frust) { - for (int i = 0; i < 8; i++) { mAgentFrustum[i] = frust[i]; diff --git a/indra/llmath/llinterp.h b/indra/llmath/llinterp.h index 36ca2e9865..88af004170 100644 --- a/indra/llmath/llinterp.h +++ b/indra/llmath/llinterp.h @@ -54,7 +54,7 @@ template <typename Type> class LLInterp { public: - LLInterp(); + LLInterp(); virtual ~LLInterp() {} virtual void start(); @@ -151,6 +151,7 @@ protected: template <typename Type> LLInterp<Type>::LLInterp() +: mStartVal(Type()), mEndVal(Type()), mCurVal(Type()) { mStartTime = 0.f; mEndTime = 1.f; diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 7a5d51ff76..209b506c30 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -203,7 +203,7 @@ inline S32 llfloor( F32 f ) } return result; #else - return (S32)floor(f); + return (S32)floorf(f); #endif } diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index ba8776690a..2f34fb1bb0 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -183,7 +183,6 @@ public: { mMax.mdV[i] = mCenter.mdV[i] + mSize.mdV[i]; mMin.mdV[i] = mCenter.mdV[i] - mSize.mdV[i]; - mCenter.mdV[i] = mCenter.mdV[i]; } } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index df4c618ac1..192c6157a8 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3822,6 +3822,7 @@ BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, // Generate the vertex mapping and the list of vertices without // duplicates. This will crash if there are no vertices. + llassert(num_input_vertices > 0); // check for no vertices! S32 *vertex_mapping = new S32[num_input_vertices]; LLVector3 *new_vertices = new LLVector3[num_input_vertices]; LLVertexIndexPair *prev_pairp = NULL; |