diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-16 10:28:35 +0000 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-16 10:28:35 +0000 |
| commit | aa7fadfde02d396ab04c82f91f01d486b4f5396d (patch) | |
| tree | 21e0e919da0ad23f3a39b5128ba5313f0f8a78d5 /indra/llmath/llvolumemgr.cpp | |
| parent | e3367fad368660bf40db29a82237475a9f2dfdbd (diff) | |
| parent | 9c5e4d315a4b5f5a0793587c6a6620f6efc76332 (diff) | |
merge from viewer2.
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; |
