From 8e6341b9194b1fb27d92d8f5e6739390ac882941 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 1 Nov 2012 17:05:26 -0600 Subject: more for SH-3459: interesting store object bounding information in viewer cache --- indra/newview/llvocache.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'indra') 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 @@ -110,6 +110,17 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) success = check_read(apr_file, &mCRCChangeCount, sizeof(S32)); } 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)); @@ -332,6 +343,17 @@ BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const success = check_write(apr_file, (void*)&mCRCChangeCount, sizeof(S32)); } 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]); -- cgit v1.2.3