aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath/llvolume.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmath/llvolume.h')
-rw-r--r--linden/indra/llmath/llvolume.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h
index 91f7c9b..7137346 100644
--- a/linden/indra/llmath/llvolume.h
+++ b/linden/indra/llmath/llvolume.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -61,12 +62,12 @@ const S32 MAX_LOD = 3;
61const F32 MIN_VOLUME_PROFILE_WIDTH = 0.05f; 62const F32 MIN_VOLUME_PROFILE_WIDTH = 0.05f;
62const F32 MIN_VOLUME_PATH_WIDTH = 0.05f; 63const F32 MIN_VOLUME_PATH_WIDTH = 0.05f;
63 64
64const F32 CUT_QUANTA = 0.005f; 65const F32 CUT_QUANTA = 0.00002f;
65const F32 SCALE_QUANTA = 0.01f; 66const F32 SCALE_QUANTA = 0.01f;
66const F32 SHEAR_QUANTA = 0.01f; 67const F32 SHEAR_QUANTA = 0.01f;
67const F32 TAPER_QUANTA = 0.01f; 68const F32 TAPER_QUANTA = 0.01f;
68const F32 REV_QUANTA = 0.015f; 69const F32 REV_QUANTA = 0.015f;
69 70const F32 HOLLOW_QUANTA = 0.00002f;
70 71
71//============================================================================ 72//============================================================================
72 73
@@ -184,7 +185,7 @@ public:
184 { 185 {
185 } 186 }
186 187
187 LLProfileParams(U8 curve, U8 begin, U8 end, U8 hollow) 188 LLProfileParams(U8 curve, U16 begin, U16 end, U16 hollow)
188 { 189 {
189 mCurveType = curve; 190 mCurveType = curve;
190 F32 temp_f32 = begin * CUT_QUANTA; 191 F32 temp_f32 = begin * CUT_QUANTA;
@@ -199,7 +200,7 @@ public:
199 temp_f32 = 1.f; 200 temp_f32 = 1.f;
200 } 201 }
201 mEnd = 1.f - temp_f32; 202 mEnd = 1.f - temp_f32;
202 temp_f32 = hollow * SCALE_QUANTA; 203 temp_f32 = hollow * HOLLOW_QUANTA;
203 if (temp_f32 > 1.f) 204 if (temp_f32 > 1.f)
204 { 205 {
205 temp_f32 = 1.f; 206 temp_f32 = 1.f;
@@ -229,9 +230,9 @@ public:
229 const U8& getCurveType () const { return mCurveType; } 230 const U8& getCurveType () const { return mCurveType; }
230 231
231 void setCurveType(const U32 type) { mCurveType = type;} 232 void setCurveType(const U32 type) { mCurveType = type;}
232 void setBegin(const F32 begin) { mBegin = (begin >= 1.0f) ? 0.0f : ((int) (begin * 1000))/1000.0f;} 233 void setBegin(const F32 begin) { mBegin = (begin >= 1.0f) ? 0.0f : ((int) (begin * 100000))/100000.0f;}
233 void setEnd(const F32 end) { mEnd = (end <= 0.0f) ? 1.0f : ((int) (end * 1000))/1000.0f;} 234 void setEnd(const F32 end) { mEnd = (end <= 0.0f) ? 1.0f : ((int) (end * 100000))/100000.0f;}
234 void setHollow(const F32 hollow) { mHollow = ((int) (hollow * 1000))/1000.0f;} 235 void setHollow(const F32 hollow) { mHollow = ((int) (hollow * 100000))/100000.0f;}
235 236
236 friend std::ostream& operator<<(std::ostream &s, const LLProfileParams &profile_params); 237 friend std::ostream& operator<<(std::ostream &s, const LLProfileParams &profile_params);
237 238
@@ -315,11 +316,11 @@ public:
315 mTaper.setVec(tx,ty); 316 mTaper.setVec(tx,ty);
316 } 317 }
317 318
318 LLPathParams(U8 curve, U8 begin, U8 end, U8 scx, U8 scy, U8 shx, U8 shy, U8 twistend, U8 twistbegin, U8 radiusoffset, U8 tx, U8 ty, U8 revolutions, U8 skew) 319 LLPathParams(U8 curve, U16 begin, U16 end, U8 scx, U8 scy, U8 shx, U8 shy, U8 twistend, U8 twistbegin, U8 radiusoffset, U8 tx, U8 ty, U8 revolutions, U8 skew)
319 { 320 {
320 mCurveType = curve; 321 mCurveType = curve;
321 mBegin = (F32)(begin * SCALE_QUANTA); 322 mBegin = (F32)(begin * CUT_QUANTA);
322 mEnd = (F32)(100.f - end) * SCALE_QUANTA; 323 mEnd = (F32)(100.f - end) * CUT_QUANTA;
323 if (mEnd > 1.f) 324 if (mEnd > 1.f)
324 mEnd = 1.f; 325 mEnd = 1.f;
325 mScale.setVec((F32) (200 - scx) * SCALE_QUANTA,(F32) (200 - scy) * SCALE_QUANTA); 326 mScale.setVec((F32) (200 - scx) * SCALE_QUANTA,(F32) (200 - scy) * SCALE_QUANTA);