summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index cafa1e5c44..10cef533b0 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2546,10 +2546,12 @@ S32 LLVolume::getNumFaces() const
{
U8 sculpt_type = (mParams.getSculptType() & LL_SCULPT_TYPE_MASK);
+#if LL_MESH_ENABLED
if (sculpt_type == LL_SCULPT_TYPE_MESH)
{
return LL_SCULPT_MESH_MAX_FACES;
}
+#endif
return (S32)mProfilep->mFaces.size();
}
@@ -2922,11 +2924,6 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
LLMemType m1(LLMemType::MTYPE_VOLUME);
U8 sculpt_type = mParams.getSculptType();
- if (sculpt_type & LL_SCULPT_TYPE_MASK == LL_SCULPT_TYPE_MESH)
- {
- llerrs << "WTF?" << llendl;
- }
-
BOOL data_is_empty = FALSE;
if (sculpt_width == 0 || sculpt_height == 0 || sculpt_components < 3 || sculpt_data == NULL)
@@ -4135,10 +4132,12 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
normals.clear();
segments.clear();
+#if LL_MESH_ENABLED
if ((mParams.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
{
return;
}
+#endif
S32 cur_index = 0;
//for each face
@@ -5567,6 +5566,8 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
corners[0].getPosition(), corners[0].mTexCoord,
corners[1].getPosition(), corners[1].mTexCoord,
corners[2].getPosition(), corners[2].mTexCoord);
+
+ binormal.normalize3fast();
S32 size = (grid_size+1)*(grid_size+1);
resizeVertices(size);
@@ -6335,10 +6336,14 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
resizeVertices(num_vertices);
resizeIndices(num_indices);
+#if LL_MESH_ENABLED
if ((volume->getParams().getSculptType() & LL_SCULPT_TYPE_MASK) != LL_SCULPT_TYPE_MESH)
{
mEdge.resize(num_indices);
}
+#else
+ mEdge.resize(num_indices);
+#endif
}
LLVector4a* pos = (LLVector4a*) mPositions;