diff options
| author | JJ Linden <jj@lindenlab.com> | 2013-10-10 16:44:22 -0700 |
|---|---|---|
| committer | JJ Linden <jj@lindenlab.com> | 2013-10-10 16:44:22 -0700 |
| commit | dc431ea6d2e4e13ab505b8118d6f9220630efe96 (patch) | |
| tree | 8c37de1ca61cf29e3d1863ce08d34acff666e9ab /indra/newview/llfloatermodelpreview.cpp | |
| parent | 3aea5a5a6ab0e6d96fe581a9bab9896956129ba3 (diff) | |
| parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
merged in recent changes
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
| -rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 100f1d580b..19cec55837 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -290,6 +290,22 @@ bool ll_is_degenerate(const LLVector4a& a, const LLVector4a& b, const LLVector4a bool validate_face(const LLVolumeFace& face) { + + for (U32 v = 0; v < face.mNumVertices; v++) + { + if(face.mPositions && !face.mPositions[v].isFinite3()) + { + llwarns << "NaN position data in face found!" << llendl; + return false; + } + + if(face.mNormals && !face.mNormals[v].isFinite3()) + { + llwarns << "NaN normal data in face found!" << llendl; + return false; + } + } + for (U32 i = 0; i < face.mNumIndices; ++i) { if (face.mIndices[i] >= face.mNumVertices) @@ -305,8 +321,10 @@ bool validate_face(const LLVolumeFace& face) return false; } + /*const LLVector4a scale(0.5f); + for (U32 i = 0; i < face.mNumIndices; i+=3) { U16 idx1 = face.mIndices[i]; @@ -323,7 +341,6 @@ bool validate_face(const LLVolumeFace& face) return false; } }*/ - return true; } @@ -5921,3 +5938,5 @@ void LLFloaterModelPreview::setPermissonsErrorStatus(U32 status, const std::stri LLNotificationsUtil::add("MeshUploadPermError"); } + + |
