summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmap.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-06-09 19:43:21 -0500
committerDave Parks <davep@lindenlab.com>2022-06-09 19:43:21 -0500
commit03d85bfb33f53e658256d8bedcf0b4262226cf90 (patch)
tree9de858b1d367fc02725c735d404d7bfec4471847 /indra/newview/llreflectionmap.cpp
parentbc85cc300d32c543ab80204a9b2fcf54b4b11935 (diff)
SL-17573 Add "dynamic" checkbox, also followup on SL-17551 and do "Select Invisible Objects" checkbox instead of "Select Reflection Probes"
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r--indra/newview/llreflectionmap.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 5991d7a170..39e0841fc5 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -51,7 +51,7 @@ void LLReflectionMap::update(U32 resolution, U32 face)
{
resolution /= 2;
}
- gViewerWindow->cubeSnapshot(LLVector3(mOrigin), mCubeArray, mCubeIndex, face, getNearClip());
+ gViewerWindow->cubeSnapshot(LLVector3(mOrigin), mCubeArray, mCubeIndex, face, getNearClip(), getIsDynamic());
}
bool LLReflectionMap::shouldUpdate()
@@ -243,6 +243,16 @@ F32 LLReflectionMap::getNearClip()
return llmax(ret, MINIMUM_NEAR_CLIP);
}
+bool LLReflectionMap::getIsDynamic()
+{
+ if (mViewerObject && mViewerObject->getVolume())
+ {
+ return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic();
+ }
+
+ return false;
+}
+
bool LLReflectionMap::getBox(LLMatrix4& box)
{
if (mViewerObject)
@@ -252,7 +262,7 @@ bool LLReflectionMap::getBox(LLMatrix4& box)
{
LLVOVolume* vobjp = (LLVOVolume*)mViewerObject;
- if (vobjp->getReflectionProbeVolumeType() == LLReflectionProbeParams::VOLUME_TYPE_BOX)
+ if (vobjp->getReflectionProbeIsBox())
{
glh::matrix4f mv(gGLModelView);
glh::matrix4f scale;