summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-10-24 14:44:48 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-10-24 14:44:48 -0400
commit6daa52b3b93328506e34d6595a01d30c334897bc (patch)
treebdbe951d06f95a1a7752d5c23950eda7bb36a9e7 /indra/llmath/llvolume.cpp
parent850bdf4ce335049a75e1c4f6400b627bf328a264 (diff)
parentb611324db58def7d65f4bfc721e7dc1c378b7fa3 (diff)
Merge branch 'develop' into maxim/viewer_2245
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 700e61467b..00a56edf68 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1294,9 +1294,9 @@ void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 en
c = cos(ang)*lerp(radius_start, radius_end, t);
- pt->mPos.set(0 + lerp(0,params.getShear().mV[0],s)
+ pt->mPos.set(0 + lerp(0.f,params.getShear().mV[0],s)
+ lerp(-skew ,skew, t) * 0.5f,
- c + lerp(0,params.getShear().mV[1],s),
+ c + lerp(0.f,params.getShear().mV[1],s),
s);
pt->mScale.set(hole_x * lerp(taper_x_begin, taper_x_end, t),
hole_y * lerp(taper_y_begin, taper_y_end, t),
@@ -1327,9 +1327,9 @@ void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 en
c = cos(ang)*lerp(radius_start, radius_end, t);
s = sin(ang)*lerp(radius_start, radius_end, t);
- pt->mPos.set(0 + lerp(0,params.getShear().mV[0],s)
+ pt->mPos.set(0 + lerp(0.f,params.getShear().mV[0],s)
+ lerp(-skew ,skew, t) * 0.5f,
- c + lerp(0,params.getShear().mV[1],s),
+ c + lerp(0.f,params.getShear().mV[1],s),
s);
pt->mScale.set(hole_x * lerp(taper_x_begin, taper_x_end, t),
@@ -1354,9 +1354,9 @@ void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 en
c = cos(ang)*lerp(radius_start, radius_end, t);
s = sin(ang)*lerp(radius_start, radius_end, t);
- pt->mPos.set(0 + lerp(0,params.getShear().mV[0],s)
+ pt->mPos.set(0 + lerp(0.f,params.getShear().mV[0],s)
+ lerp(-skew ,skew, t) * 0.5f,
- c + lerp(0,params.getShear().mV[1],s),
+ c + lerp(0.f,params.getShear().mV[1],s),
s);
pt->mScale.set(hole_x * lerp(taper_x_begin, taper_x_end, t),
hole_y * lerp(taper_y_begin, taper_y_end, t),
@@ -1494,8 +1494,8 @@ bool LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
for (S32 i=0;i<np;i++)
{
F32 t = lerp(params.getBegin(),params.getEnd(),(F32)i * mStep);
- mPath[i].mPos.set(lerp(0,params.getShear().mV[0],t),
- lerp(0,params.getShear().mV[1],t),
+ mPath[i].mPos.set(lerp(0.f,params.getShear().mV[0],t),
+ lerp(0.f,params.getShear().mV[1],t),
t - 0.5f);
LLQuaternion quat;
quat.setQuat(lerp(F_PI * params.getTwistBegin(),F_PI * params.getTwist(),t),0,0,1);
@@ -1559,10 +1559,10 @@ bool LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
{
F32 t = (F32)i * mStep;
mPath[i].mPos.set(0,
- lerp(0, -sin(F_PI*params.getTwist()*t)*0.5f,t),
+ lerp(0.f, -sin(F_PI*params.getTwist()*t)*0.5f,t),
lerp(-0.5f, cos(F_PI*params.getTwist()*t)*0.5f,t));
- mPath[i].mScale.set(lerp(1,params.getScale().mV[0],t),
- lerp(1,params.getScale().mV[1],t), 0,1);
+ mPath[i].mScale.set(lerp(1.f,params.getScale().mV[0],t),
+ lerp(1.f,params.getScale().mV[1],t), 0.f, 1.f);
mPath[i].mTexT = t;
LLQuaternion quat;
quat.setQuat(F_PI * params.getTwist() * t,1,0,0);