summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-11-01 17:05:26 -0600
committerXiaohong Bao <bao@lindenlab.com>2012-11-01 17:05:26 -0600
commit8e6341b9194b1fb27d92d8f5e6739390ac882941 (patch)
tree7b948b146d55d9cfec55e633c6eae70c36f751bf /indra
parent5ae116f89b8459963ccb6ae9125d94ffaa79025e (diff)
more for SH-3459: interesting store object bounding information in viewer cache
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvocache.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index d4938fd216..db6aa9cd00 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -111,6 +111,17 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file)
}
if(success)
{
+ F32 ext[8];
+ success = check_read(apr_file, (void*)ext, sizeof(F32) * 8);
+
+ LLVector4a exts[2];
+ exts[0].load4a(ext);
+ exts[1].load4a(&ext[4]);
+
+ setSpatialExtents(exts[0], exts[1]);
+ }
+ if(success)
+ {
LLVector4 pos;
success = check_read(apr_file, (void*)pos.mV, sizeof(LLVector4));
@@ -333,6 +344,17 @@ BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const
}
if(success)
{
+ const LLVector4a* exts = getSpatialExtents() ;
+ LLVector4 ext(exts[0][0], exts[0][1], exts[0][2], exts[0][3]);
+ success = check_write(apr_file, ext.mV, sizeof(LLVector4));
+ if(success)
+ {
+ ext.set(exts[1][0], exts[1][1], exts[1][2], exts[1][3]);
+ success = check_write(apr_file, ext.mV, sizeof(LLVector4));
+ }
+ }
+ if(success)
+ {
const LLVector4a pos_ = getPositionGroup() ;
LLVector4 pos(pos_[0], pos_[1], pos_[2], pos_[3]);
success = check_write(apr_file, pos.mV, sizeof(LLVector4));