diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-04-07 13:50:47 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-04-07 13:50:47 -0500 |
| commit | 666c7c429b7f38f7c93bf6c287157c2e3ab9ccd7 (patch) | |
| tree | 8f3e9399dbc5cab6c28c5992b579368bb0aa8949 /indra/llmath/llvolumemgr.cpp | |
| parent | 8ac6310020bd2d524c97c729c29a0afe4a529ecf (diff) | |
| parent | b6d3d2281b855448bbeec33b2d229222d75cd6b1 (diff) | |
merge
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 53641fceab..419e0015ba 100644 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -320,7 +320,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; @@ -375,6 +375,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; |
