aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath/llvolume.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llmath/llvolume.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h
index 5ec7997..9dbea7a 100644
--- a/linden/indra/llmath/llvolume.h
+++ b/linden/indra/llmath/llvolume.h
@@ -72,6 +72,8 @@ const F32 TAPER_QUANTA = 0.01f;
72const F32 REV_QUANTA = 0.015f; 72const F32 REV_QUANTA = 0.015f;
73const F32 HOLLOW_QUANTA = 0.00002f; 73const F32 HOLLOW_QUANTA = 0.00002f;
74 74
75const S32 MAX_VOLUME_TRIANGLE_INDICES = 10000;
76
75//============================================================================ 77//============================================================================
76 78
77// useful masks 79// useful masks
@@ -187,10 +189,10 @@ class LLProfileParams
187public: 189public:
188 LLProfileParams() 190 LLProfileParams()
189 { 191 {
190 mBegin = 0;
191 mEnd = 1;
192 mHollow = 0;
193 mCurveType = LL_PCODE_PROFILE_SQUARE; 192 mCurveType = LL_PCODE_PROFILE_SQUARE;
193 mBegin = 0.f;
194 mEnd = 1.f;
195 mHollow = 0.f;
194 } 196 }
195 197
196 LLProfileParams(U8 curve, F32 begin, F32 end, F32 hollow) 198 LLProfileParams(U8 curve, F32 begin, F32 end, F32 hollow)
@@ -307,17 +309,17 @@ class LLPathParams
307public: 309public:
308 LLPathParams() 310 LLPathParams()
309 { 311 {
310 mBegin = 0; 312 mBegin = 0.f;
311 mEnd = 1; 313 mEnd = 1.f;
312 mScale.setVec(1,1); 314 mScale.setVec(1.f,1.f);
313 mShear.setVec(0,0); 315 mShear.setVec(0.f,0.f);
314 mCurveType = LL_PCODE_PATH_LINE; 316 mCurveType = LL_PCODE_PATH_LINE;
315 mTwistBegin = 0; 317 mTwistBegin = 0.f;
316 mTwistEnd = 0; 318 mTwistEnd = 0.f;
317 mRadiusOffset = 0; 319 mRadiusOffset = 0.f;
318 mTaper.setVec(0,0); 320 mTaper.setVec(0.f,0.f);
319 mRevolutions = 1; 321 mRevolutions = 1.f;
320 mSkew = 0; 322 mSkew = 0.f;
321 } 323 }
322 324
323 LLPathParams(U8 curve, F32 begin, F32 end, F32 scx, F32 scy, F32 shx, F32 shy, F32 twistend, F32 twistbegin, F32 radiusoffset, F32 tx, F32 ty, F32 revolutions, F32 skew) 325 LLPathParams(U8 curve, F32 begin, F32 end, F32 scx, F32 scy, F32 shx, F32 shy, F32 twistend, F32 twistbegin, F32 radiusoffset, F32 tx, F32 ty, F32 revolutions, F32 skew)
@@ -627,6 +629,9 @@ public:
627 629
628 friend std::ostream& operator<<(std::ostream &s, const LLVolumeParams &volume_params); 630 friend std::ostream& operator<<(std::ostream &s, const LLVolumeParams &volume_params);
629 631
632 // debug helper functions
633 void setCube();
634
630protected: 635protected:
631 LLProfileParams mProfileParams; 636 LLProfileParams mProfileParams;
632 LLPathParams mPathParams; 637 LLPathParams mPathParams;
@@ -869,6 +874,10 @@ public:
869 S32 getSculptLevel() const { return mSculptLevel; } 874 S32 getSculptLevel() const { return mSculptLevel; }
870 875
871 S32 *getTriangleIndices(U32 &num_indices) const; 876 S32 *getTriangleIndices(U32 &num_indices) const;
877
878 // returns number of triangle indeces required for path/profile mesh
879 S32 getNumTriangleIndices() const;
880
872 void generateSilhouetteVertices(std::vector<LLVector3> &vertices, std::vector<LLVector3> &normals, std::vector<S32> &segments, const LLVector3& view_vec, 881 void generateSilhouetteVertices(std::vector<LLVector3> &vertices, std::vector<LLVector3> &normals, std::vector<S32> &segments, const LLVector3& view_vec,
873 const LLMatrix4& mat, 882 const LLMatrix4& mat,
874 const LLMatrix3& norm_mat); 883 const LLMatrix3& norm_mat);