summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llvolume.cpp7
-rw-r--r--indra/llmath/llvolume.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index fb2de92e35..44ff173502 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1952,8 +1952,12 @@ BOOL LLVolume::createVolumeFacesFromStream(std::istream& is)
}
is.seekg(header[nm[lod]]["offset"].asInteger(), std::ios_base::cur);
-
+ return unpackVolumeFaces(is, header[nm[lod]]["size"].asInteger());
+}
+
+BOOL LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
+{
U8* result = NULL;
U32 cur_size = 0;
@@ -1964,7 +1968,6 @@ BOOL LLVolume::createVolumeFacesFromStream(std::istream& is)
const U32 CHUNK = 65536;
- S32 size = header[nm[lod]]["size"].asInteger();
U8 *in = new U8[size];
is.read((char*) in, size);
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 59c60ccd92..9970b24a94 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -971,6 +971,8 @@ protected:
public:
virtual BOOL createVolumeFacesFromFile(const std::string& file_name);
virtual BOOL createVolumeFacesFromStream(std::istream& is);
+ virtual BOOL unpackVolumeFaces(std::istream& is, S32 size);
+
virtual void makeTetrahedron();
virtual BOOL isTetrahedron();