diff options
author | Dave Parks <davep@lindenlab.com> | 2011-05-05 18:33:03 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-05-05 18:33:03 -0500 |
commit | ca0a568264ca1f9990b2450cc55f3cc011d59e63 (patch) | |
tree | 95a03c0b5efe9f8f94ada63690902a7606523026 /indra/llprimitive/llmodel.cpp | |
parent | 3c516973f3a508d2bf0060d8dc70fa0d7809340f (diff) |
SH-1497 Don't upload physics mesh if decomposition exists.
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index ebd2fc7a29..e9e212c5c6 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1404,6 +1404,10 @@ LLSD LLModel::writeModel( !decomp.mHull.empty()) { mdl["physics_convex"] = decomp.asLLSD(); + if (!decomp.mHull.empty()) + { //convex decomposition exists, physics mesh will not be used + model[LLModel::LOD_PHYSICS] = NULL; + } } for (U32 idx = 0; idx < MODEL_NAMES_LENGTH; ++idx) @@ -2138,10 +2142,12 @@ LLSD LLModel::Decomposition::asLLSD() const U64 test = 0; for (U32 k = 0; k < 3; k++) { - llassert(mHull[i][j].mV[k] <= 0.50001f && mHull[i][j].mV[k] >= -0.50001f); + F32* src = (F32*) (mHull[i][j].mV); + + llassert(src[k] <= 0.501f && src[k] >= -0.501f); //convert to 16-bit normalized across domain - U16 val = (U16) (((mHull[i][j].mV[k]-min.mV[k])/range.mV[k])*65535); + U16 val = (U16) (((src[k]-min.mV[k])/range.mV[k])*65535); switch (k) { |