summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive')
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/CMakeLists.txt0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/legacy_object_types.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmaterialtable.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmaterialtable.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmediaentry.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmediaentry.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmodel.cpp43
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmodel.h5
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimitive.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimitive.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimlinkinfo.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimtexturelist.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimtexturelist.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureanim.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureanim.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureentry.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureentry.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltree_common.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltreeparams.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltreeparams.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumemessage.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumemessage.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumexml.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumexml.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/material_codes.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/material_codes.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/object_flags.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/tests/llmediaentry_test.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/tests/llmessagesystem_stub.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/tests/llprimitive_test.cpp0
30 files changed, 24 insertions, 24 deletions
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index af78ed7936..af78ed7936 100644..100755
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
diff --git a/indra/llprimitive/legacy_object_types.h b/indra/llprimitive/legacy_object_types.h
index 645af83287..645af83287 100644..100755
--- a/indra/llprimitive/legacy_object_types.h
+++ b/indra/llprimitive/legacy_object_types.h
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp
index 774a58c8ac..774a58c8ac 100644..100755
--- a/indra/llprimitive/llmaterialtable.cpp
+++ b/indra/llprimitive/llmaterialtable.cpp
diff --git a/indra/llprimitive/llmaterialtable.h b/indra/llprimitive/llmaterialtable.h
index 77f29a8e06..77f29a8e06 100644..100755
--- a/indra/llprimitive/llmaterialtable.h
+++ b/indra/llprimitive/llmaterialtable.h
diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp
index 2fc1e5e60c..2fc1e5e60c 100644..100755
--- a/indra/llprimitive/llmediaentry.cpp
+++ b/indra/llprimitive/llmediaentry.cpp
diff --git a/indra/llprimitive/llmediaentry.h b/indra/llprimitive/llmediaentry.h
index 2a5486666a..2a5486666a 100644..100755
--- a/indra/llprimitive/llmediaentry.h
+++ b/indra/llprimitive/llmediaentry.h
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index e4b7cd80ce..349c844470 100644..100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -41,7 +41,6 @@
#include "dom/domMesh.h"
#include "zlib/zlib.h"
-#if LL_MESH_ENABLED
std::string model_names[] =
{
@@ -120,7 +119,7 @@ void load_face_from_dom_inputs(LLVolumeFace& face, const domInputLocalOffset_Arr
{
LLVector4a* norm = (LLVector4a*) face.mNormals + (j-min_idx);
norm->set(n[j*3+0], n[j*3+1], n[j*3+2]);
- norm->normalize3fast();
+ norm->normalize3();
}
}
else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[j]->getSemantic()) == 0)
@@ -1041,6 +1040,12 @@ void LLModel::smoothNormals(F32 angle_cutoff)
{
LLVolumeFace& vol_face = mVolumeFaces[j];
+ if (vol_face.mNumIndices > 65535)
+ {
+ llwarns << "Too many vertices for normal generation to work." << llendl;
+ continue;
+ }
+
//create faceted copy of current face with no texture coordinates (step 1)
LLVolumeFace faceted;
@@ -1048,16 +1053,16 @@ void LLModel::smoothNormals(F32 angle_cutoff)
//LLVector4a* src_norm = (LLVector4a*) vol_face.mNormals;
- //bake out triangles into temporary face, clearing normals and texture coordinates
+ faceted.resizeVertices(vol_face.mNumIndices);
+ faceted.resizeIndices(vol_face.mNumIndices);
+ //bake out triangles into temporary face, clearing texture coordinates
for (U32 i = 0; i < vol_face.mNumIndices; ++i)
{
U32 idx = vol_face.mIndices[i];
- LLVolumeFace::VertexData v;
- v.setPosition(src_pos[idx]);
- v.getNormal().clear();
- v.mTexCoord.clear();
- faceted.pushVertex(v);
- faceted.pushIndex(i);
+
+ faceted.mPositions[i] = src_pos[idx];
+ faceted.mTexCoords[i] = LLVector2(0,0);
+ faceted.mIndices[i] = i;
}
//generate normals for temporary face
@@ -1080,7 +1085,7 @@ void LLModel::smoothNormals(F32 angle_cutoff)
rhs.setSub(p2, p0);
n0.setCross3(lhs, rhs);
- n0.normalize3fast();
+ n0.normalize3();
n1 = n0;
n2 = n0;
}
@@ -1126,7 +1131,7 @@ void LLModel::smoothNormals(F32 angle_cutoff)
for (U32 i = 0; i < faceted.mNumVertices; ++i)
{
- faceted.mNormals[i].normalize3fast();
+ faceted.mNormals[i].normalize3();
LLVolumeFace::VertexMapData v;
v.setPosition(faceted.mPositions[i]);
@@ -1139,16 +1144,17 @@ void LLModel::smoothNormals(F32 angle_cutoff)
LLVolumeFace new_face;
//bake out triangles into new face
+ new_face.resizeIndices(vol_face.mNumIndices);
+ new_face.resizeVertices(vol_face.mNumIndices);
+
for (U32 i = 0; i < vol_face.mNumIndices; ++i)
{
U32 idx = vol_face.mIndices[i];
LLVolumeFace::VertexData v;
- v.setPosition(vol_face.mPositions[idx]);
- v.setNormal(vol_face.mNormals[idx]);
- v.mTexCoord = vol_face.mTexCoords[idx];
-
- new_face.pushVertex(v);
- new_face.pushIndex(i);
+ new_face.mPositions[i] = vol_face.mPositions[idx];
+ new_face.mNormals[i].clear();
+ new_face.mTexCoords[i] = vol_face.mTexCoords[idx];
+ new_face.mIndices[i] = i;
}
//generate normals for new face
@@ -1171,7 +1177,7 @@ void LLModel::smoothNormals(F32 angle_cutoff)
rhs.setSub(p2, p0);
n0.setCross3(lhs, rhs);
- n0.normalize3fast();
+ n0.normalize3();
n1 = n0;
n2 = n0;
}
@@ -1703,5 +1709,4 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
}
}
-#endif
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index a91c80d5b7..ea703d7228 100644..100755
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -36,8 +36,6 @@
#include "v4math.h"
#include "m4math.h"
-#if LL_MESH_ENABLED
-
class daeElement;
class domMesh;
@@ -173,7 +171,4 @@ protected:
virtual BOOL createVolumeFacesFromDomMesh(domMesh *mesh);
};
-
-#endif
-
#endif //LL_LLMODEL_H
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 732f5a698b..732f5a698b 100644..100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index a44b9a6c1f..a44b9a6c1f 100644..100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
diff --git a/indra/llprimitive/llprimlinkinfo.h b/indra/llprimitive/llprimlinkinfo.h
index 946fa75bfa..946fa75bfa 100644..100755
--- a/indra/llprimitive/llprimlinkinfo.h
+++ b/indra/llprimitive/llprimlinkinfo.h
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index 1c7de95975..1c7de95975 100644..100755
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h
index 6254878b99..6254878b99 100644..100755
--- a/indra/llprimitive/llprimtexturelist.h
+++ b/indra/llprimitive/llprimtexturelist.h
diff --git a/indra/llprimitive/lltextureanim.cpp b/indra/llprimitive/lltextureanim.cpp
index 011f04776e..011f04776e 100644..100755
--- a/indra/llprimitive/lltextureanim.cpp
+++ b/indra/llprimitive/lltextureanim.cpp
diff --git a/indra/llprimitive/lltextureanim.h b/indra/llprimitive/lltextureanim.h
index c618092f16..c618092f16 100644..100755
--- a/indra/llprimitive/lltextureanim.h
+++ b/indra/llprimitive/lltextureanim.h
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index f75f1d9b8c..f75f1d9b8c 100644..100755
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h
index d6366b9bb2..d6366b9bb2 100644..100755
--- a/indra/llprimitive/lltextureentry.h
+++ b/indra/llprimitive/lltextureentry.h
diff --git a/indra/llprimitive/lltree_common.h b/indra/llprimitive/lltree_common.h
index 7d36447f88..7d36447f88 100644..100755
--- a/indra/llprimitive/lltree_common.h
+++ b/indra/llprimitive/lltree_common.h
diff --git a/indra/llprimitive/lltreeparams.cpp b/indra/llprimitive/lltreeparams.cpp
index 1c82fb63f7..1c82fb63f7 100644..100755
--- a/indra/llprimitive/lltreeparams.cpp
+++ b/indra/llprimitive/lltreeparams.cpp
diff --git a/indra/llprimitive/lltreeparams.h b/indra/llprimitive/lltreeparams.h
index 9ca2c81ec6..9ca2c81ec6 100644..100755
--- a/indra/llprimitive/lltreeparams.h
+++ b/indra/llprimitive/lltreeparams.h
diff --git a/indra/llprimitive/llvolumemessage.cpp b/indra/llprimitive/llvolumemessage.cpp
index dcfecb1407..dcfecb1407 100644..100755
--- a/indra/llprimitive/llvolumemessage.cpp
+++ b/indra/llprimitive/llvolumemessage.cpp
diff --git a/indra/llprimitive/llvolumemessage.h b/indra/llprimitive/llvolumemessage.h
index 514c7007a4..514c7007a4 100644..100755
--- a/indra/llprimitive/llvolumemessage.h
+++ b/indra/llprimitive/llvolumemessage.h
diff --git a/indra/llprimitive/llvolumexml.cpp b/indra/llprimitive/llvolumexml.cpp
index cdc6f62696..cdc6f62696 100644..100755
--- a/indra/llprimitive/llvolumexml.cpp
+++ b/indra/llprimitive/llvolumexml.cpp
diff --git a/indra/llprimitive/llvolumexml.h b/indra/llprimitive/llvolumexml.h
index 1c6a50ce3b..1c6a50ce3b 100644..100755
--- a/indra/llprimitive/llvolumexml.h
+++ b/indra/llprimitive/llvolumexml.h
diff --git a/indra/llprimitive/material_codes.cpp b/indra/llprimitive/material_codes.cpp
index ce146dad8a..ce146dad8a 100644..100755
--- a/indra/llprimitive/material_codes.cpp
+++ b/indra/llprimitive/material_codes.cpp
diff --git a/indra/llprimitive/material_codes.h b/indra/llprimitive/material_codes.h
index ba3faba39f..ba3faba39f 100644..100755
--- a/indra/llprimitive/material_codes.h
+++ b/indra/llprimitive/material_codes.h
diff --git a/indra/llprimitive/object_flags.h b/indra/llprimitive/object_flags.h
index c873f502b4..c873f502b4 100644..100755
--- a/indra/llprimitive/object_flags.h
+++ b/indra/llprimitive/object_flags.h
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index 88cd96ebe4..88cd96ebe4 100644..100755
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
diff --git a/indra/llprimitive/tests/llmessagesystem_stub.cpp b/indra/llprimitive/tests/llmessagesystem_stub.cpp
index 8ca3c56022..8ca3c56022 100644..100755
--- a/indra/llprimitive/tests/llmessagesystem_stub.cpp
+++ b/indra/llprimitive/tests/llmessagesystem_stub.cpp
diff --git a/indra/llprimitive/tests/llprimitive_test.cpp b/indra/llprimitive/tests/llprimitive_test.cpp
index 1805a9e968..1805a9e968 100644..100755
--- a/indra/llprimitive/tests/llprimitive_test.cpp
+++ b/indra/llprimitive/tests/llprimitive_test.cpp