summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2009-12-11 14:50:45 -0600
committerDave Parks <davep@lindenlab.com>2009-12-11 14:50:45 -0600
commit35e2527230beacf8a545f8d609a61c80812bed32 (patch)
tree2a5d250b34e1aded387fb06b109bbb4fe0a9bcb8 /indra/llmath
parentfadfa09e6d3bbff9ebae0aabeacf26a83aae4ad7 (diff)
parent695969c77066de5032bdc9caefecf9b32b076b2f (diff)
merge
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();