diff options
Diffstat (limited to 'indra/llmath')
-rwxr-xr-x | indra/llmath/llmath.h | 1 | ||||
-rwxr-xr-x | indra/llmath/llsphere.cpp | 6 | ||||
-rwxr-xr-x | indra/llmath/llvolume.cpp | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index b4ac1dec73..7f39e58f71 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -559,6 +559,7 @@ inline void ll_remove_outliers(std::vector<VEC_TYPE>& data, F32 k) inline void ll_nn2d_interpolation(const U8 *const src, U32 srcW, U32 srcH, U8 srcCh, U8 *const dst, U32 dstW, U32 dstH, U8 dstCh) { + llassert(NULL != src && NULL != dst); llassert(srcCh>=dstCh); S32 tmp_x = 0, tmp_y = 0, tmp_x1 = 0, tmp_x2 = 0; diff --git a/indra/llmath/llsphere.cpp b/indra/llmath/llsphere.cpp index 740047b93a..a8d6200488 100755 --- a/indra/llmath/llsphere.cpp +++ b/indra/llmath/llsphere.cpp @@ -248,8 +248,8 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list) // compute the starting step-size F32 minimum_radius = 0.5f * llmin(diagonal.mV[VX], llmin(diagonal.mV[VY], diagonal.mV[VZ])); F32 step_length = bounding_radius - minimum_radius; - S32 step_count = 0; - S32 max_step_count = 12; + //S32 step_count = 0; + //S32 max_step_count = 12; F32 half_milimeter = 0.0005f; // wander the center around in search of tighter solutions @@ -258,7 +258,7 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list) S32 last_dz = 2; while (step_length > half_milimeter - && step_count < max_step_count) + /*&& step_count < max_step_count*/) { // the algorithm for testing the maximum radius could be expensive enough // that it makes sense to NOT duplicate testing when possible, so we keep diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d9a68cb577..98ff36c363 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6284,6 +6284,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) num_vertices = mNumS*mNumT; num_indices = (mNumS-1)*(mNumT-1)*6; + partial_build = (num_vertices > mNumVertices || num_indices > mNumIndices) ? FALSE : partial_build; + if (!partial_build) { resizeVertices(num_vertices); |