diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-04-08 15:58:11 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-04-08 15:58:11 -0400 |
commit | 2deea74cf6f08376e14e2f7e5333fc6959d2af19 (patch) | |
tree | 80429812cfb4f88a151627830dceb4a8f2e278dd /indra/llmath/llvolume.cpp | |
parent | 534ac19ed5a6abe68ea654a5444b7e486f8ce06a (diff) | |
parent | 8807496ed78b36658f488d901842852d63f73cb9 (diff) |
merging mesh-development into nyx's mesh development
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r-- | indra/llmath/llvolume.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 7a2f06da8f..dc360818d6 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2143,56 +2143,6 @@ bool LLVolumeFace::VertexData::compareNormal(const LLVolumeFace::VertexData& rhs return retval;
}
-BOOL LLVolume::createVolumeFacesFromFile(const std::string& file_name)
-{
- std::ifstream is;
-
- is.open(file_name.c_str(), std::ifstream::in | std::ifstream::binary);
-
- BOOL success = createVolumeFacesFromStream(is);
-
- is.close();
-
- return success;
-}
-
-BOOL LLVolume::createVolumeFacesFromStream(std::istream& is)
-{
- mSculptLevel = -1; // default is an error occured
-
- LLSD header;
- {
- if (!LLSDSerialize::fromBinary(header, is, 1024*1024*1024))
- {
- llwarns << "Mesh header parse error. Not a valid mesh asset!" << llendl;
- return FALSE;
- }
- }
-
- std::string nm[] =
- {
- "lowest_lod",
- "low_lod",
- "medium_lod",
- "high_lod",
- "physics_shape",
- };
-
- const S32 MODEL_LODS = 5;
-
- S32 lod = llclamp((S32) mDetail, 0, MODEL_LODS);
-
- if (header[nm[lod]]["offset"].asInteger() == -1 ||
- header[nm[lod]]["size"].asInteger() == 0 )
- { //cannot load requested LOD
- return FALSE;
- }
-
- 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)
{
//input stream is now pointing at a zlib compressed block of LLSD
|