summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath')
-rwxr-xr-xindra/llmath/llvolume.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index f0cff6e5cd..d9a68cb577 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1389,7 +1389,7 @@ void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 en
hole_y * lerp(taper_y_begin, taper_y_end, t),
0,1);
pt->mTexT = t;
-
+
// Twist rotates the path along the x,y plane (I think) - DJS 04/05/02
twist.setQuat (lerp(twist_begin,twist_end,t) * 2.f * F_PI - F_PI,0,0,1);
// Rotate the point around the circle's center.
@@ -1449,7 +1449,7 @@ void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 en
hole_y * lerp(taper_y_begin, taper_y_end, t),
0,1);
pt->mTexT = t;
-
+
// Twist rotates the path along the x,y plane (I think) - DJS 04/05/02
twist.setQuat (lerp(twist_begin,twist_end,t) * 2.f * F_PI - F_PI,0,0,1);
// Rotate the point around the circle's center.
@@ -3963,7 +3963,7 @@ S32 LLVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& en
n1.add(n2);
n1.add(n3);
-
+
*normal = n1;
}
@@ -5480,7 +5480,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
S32 size = (grid_size+1)*(grid_size+1);
resizeVertices(size);
-
+
LLVector4a* pos = (LLVector4a*) mPositions;
LLVector4a* norm = (LLVector4a*) mNormals;
LLVector2* tc = (LLVector2*) mTexCoords;
@@ -5501,7 +5501,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
*pos++ = newVert.getPosition();
*norm++ = baseVert.getNormal();
*tc++ = newVert.mTexCoord;
-
+
if (gx == 0 && gy == 0)
{
min = newVert.getPosition();
@@ -5578,7 +5578,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
if (!(mTypeMask & HOLLOW_MASK) && !(mTypeMask & OPEN_MASK))
{
resizeVertices(num_vertices+1);
-
+
if (!partial_build)
{
resizeIndices(num_indices+3);
@@ -5622,7 +5622,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
LLVector2* tc = (LLVector2*) mTexCoords;
LLVector4a* pos = (LLVector4a*) mPositions;
LLVector4a* norm = (LLVector4a*) mNormals;
-
+
// Copy the vertices into the array
const LLVector4a* src = mesh.mArray+offset;
@@ -5995,7 +5995,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
void LLVolumeFace::createTangents()
{
if (!mTangents)
- {
+ {
allocateTangents(mNumVertices);
//generate tangents
@@ -6005,7 +6005,7 @@ void LLVolumeFace::createTangents()
LLVector4a* end = mTangents+mNumVertices;
while (binorm < end)
- {
+ {
(*binorm++).clear();
}
@@ -6747,7 +6747,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
return TRUE;
}
-//adapted from Lengyel, Eric. “Computing Tangent Space Basis Vectors for an Arbitrary Mesh”. Terathon Software 3D Graphics Library, 2001. http://www.terathon.com/code/tangent.html
+//adapted from Lengyel, Eric. "Computing Tangent Space Basis Vectors for an Arbitrary Mesh". Terathon Software 3D Graphics Library, 2001. http://www.terathon.com/code/tangent.html
void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVector4a *normal,
const LLVector2 *texcoord, U32 triangleCount, const U16* index_array, LLVector4a *tangent)
{
@@ -6759,7 +6759,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
memset(tan1, 0, vertexCount*2*sizeof(LLVector4a));
for (U32 a = 0; a < triangleCount; a++)
-{
+ {
U32 i1 = *index_array++;
U32 i2 = *index_array++;
U32 i3 = *index_array++;
@@ -6804,7 +6804,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
tan1[i1].add(sdir);
tan1[i2].add(sdir);
tan1[i3].add(sdir);
-
+
tan2[i1].add(tdir);
tan2[i2].add(tdir);
tan2[i3].add(tdir);
@@ -6818,7 +6818,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
LLVector4a ncrosst;
ncrosst.setCross3(n,t);
-
+
// Gram-Schmidt orthogonalize
n.mul(n.dot3(t).getF32());
@@ -6826,7 +6826,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
tsubn.setSub(t,n);
if (tsubn.dot3(tsubn).getF32() > F_APPROXIMATELY_ZERO)
- {
+ {
tsubn.normalize3fast();
// Calculate handedness
@@ -6840,7 +6840,7 @@ void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVe
{ //degenerate, make up a value
tangent[a].set(0,0,1,1);
}
- }
+ }
ll_aligned_free_16(tan1);
}