diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-05-23 11:38:33 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-05-23 11:38:33 -0400 |
| commit | 551d17f819ea3dbcdc61cb41a458ab6d893d28cf (patch) | |
| tree | 130c90ed3b0f6a4245af843cf9170130d549dc4f /indra/llmath/llvolumemgr.cpp | |
| parent | 99fe1004a6cb4406bcac790420a5be6269e02723 (diff) | |
| parent | e5752934be74a84e6ec0ff8cb96974bd1e9060ec (diff) | |
merge latest changes (post-2.7.0) from viewer-development
Diffstat (limited to 'indra/llmath/llvolumemgr.cpp')
| -rw-r--r-- | indra/llmath/llvolumemgr.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp index 88c195936c..c60b750088 100644 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -314,7 +314,7 @@ BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep) { llassert_always(mLODRefs[i] > 0); mLODRefs[i]--; -#if 1 // SJB: Possible opt: keep other lods around +#if 0 // SJB: Possible opt: keep other lods around if (!mLODRefs[i]) { mVolumeLODs[i] = NULL; @@ -369,6 +369,19 @@ F32 LLVolumeLODGroup::getVolumeScaleFromDetail(const S32 detail) return mDetailScales[detail]; } +S32 LLVolumeLODGroup::getVolumeDetailFromScale(const F32 detail) +{ + for (S32 i = 1; i < 4; i++) + { + if (mDetailScales[i] > detail) + { + return i-1; + } + } + + return 3; +} + F32 LLVolumeLODGroup::dump() { F32 usage = 0.f; |
