From 86acaec2979f6903d93d0cc277d380a2ec012b00 Mon Sep 17 00:00:00 2001 From: Patrick Sapinski Date: Tue, 24 Aug 2010 14:40:28 -0400 Subject: updated chatbar command line and added the necessary settings and hooks to use it --- linden/indra/llmath/llvolume.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index e55fe52..2b1c60d 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h @@ -154,6 +154,9 @@ const U8 LL_PCODE_PATH_IGNORE = 0x00; const U8 LL_PCODE_PATH_MIN = 0x01; // min/max needs to be >> 4 of real min/max const U8 LL_PCODE_PATH_LINE = 0x10; const U8 LL_PCODE_PATH_CIRCLE = 0x20; +//<-- Working33 by Gregory Maurer +const U8 LL_PCODE_PATH_CIRCLE_33 = 0x21; +//Working33 --> const U8 LL_PCODE_PATH_CIRCLE2 = 0x30; const U8 LL_PCODE_PATH_TEST = 0x40; const U8 LL_PCODE_PATH_FLEXIBLE = 0x80; -- cgit v1.1 From 35df5441d3e2789663532c948731aff3a1e04728 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 14 Jun 2010 12:04:49 +0200 Subject: llmediaplugins first step --- linden/indra/llmath/CMakeLists.txt | 1 + linden/indra/llmath/llmath.h | 10 ++++------ linden/indra/llmath/llvolume.cpp | 8 +++++++- linden/indra/llmath/llvolume.h | 10 +++++++--- linden/indra/llmath/v3math.h | 4 ++-- 5 files changed, 21 insertions(+), 12 deletions(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/CMakeLists.txt b/linden/indra/llmath/CMakeLists.txt index e5ec3e1..c05bf1d 100644 --- a/linden/indra/llmath/CMakeLists.txt +++ b/linden/indra/llmath/CMakeLists.txt @@ -83,3 +83,4 @@ set_source_files_properties(${llmath_HEADER_FILES} list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) +add_dependencies(llmath prepare) diff --git a/linden/indra/llmath/llmath.h b/linden/indra/llmath/llmath.h index 9f8e539..0de568c 100644 --- a/linden/indra/llmath/llmath.h +++ b/linden/indra/llmath/llmath.h @@ -35,6 +35,7 @@ #include #include +#include #include "lldefs.h" #include "llstl.h" // *TODO: Remove when LLString is gone #include "llstring.h" // *TODO: Remove when LLString is gone @@ -60,7 +61,9 @@ #endif // Single Precision Floating Point Routines -#if _MSC_VER < 1400 +#ifndef fsqrtf +#define fsqrtf(x) ((F32)sqrt((F64)(x))) +#endif #ifndef sqrtf #define sqrtf(x) ((F32)sqrt((F64)(x))) #endif @@ -81,11 +84,6 @@ #ifndef powf #define powf(x,y) ((F32)pow((F64)(x),(F64)(y))) #endif -#endif - -#ifndef fsqrtf -#define fsqrtf(x) sqrtf(x) -#endif const F32 GRAVITY = -9.8f; diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 4c94a52..b0b8a94 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -3376,7 +3376,8 @@ void LLVolume::generateSilhouetteVertices(std::vector &vertices, std::vector &segments, const LLVector3& obj_cam_vec, const LLMatrix4& mat, - const LLMatrix3& norm_mat) + const LLMatrix3& norm_mat, + S32 face_mask) { LLMemType m1(LLMemType::MTYPE_VOLUME); @@ -3384,12 +3385,17 @@ void LLVolume::generateSilhouetteVertices(std::vector &vertices, normals.clear(); segments.clear(); + S32 cur_index = 0; //for each face for (face_list_t::iterator iter = mVolumeFaces.begin(); iter != mVolumeFaces.end(); ++iter) { const LLVolumeFace& face = *iter; + if (!(face_mask & (0x1 << cur_index++))) + { + continue; + } if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) { } diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index 2b1c60d..0b9002f 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h @@ -905,9 +905,13 @@ public: // returns number of triangle indeces required for path/profile mesh S32 getNumTriangleIndices() const; - void generateSilhouetteVertices(std::vector &vertices, std::vector &normals, std::vector &segments, const LLVector3& view_vec, - const LLMatrix4& mat, - const LLMatrix3& norm_mat); + void generateSilhouetteVertices(std::vector &vertices, + std::vector &normals, + std::vector &segments, + const LLVector3& view_vec, + const LLMatrix4& mat, + const LLMatrix3& norm_mat, + S32 face_index); //get the face index of the face that intersects with the given line segment at the point //closest to start. Moves end to the point of intersection. Returns -1 if no intersection. diff --git a/linden/indra/llmath/v3math.h b/linden/indra/llmath/v3math.h index 7f96800..8c65d93 100644 --- a/linden/indra/llmath/v3math.h +++ b/linden/indra/llmath/v3math.h @@ -411,8 +411,8 @@ inline bool operator<(const LLVector3 &a, const LLVector3 &b) return (a.mV[0] < b.mV[0] || (a.mV[0] == b.mV[0] && (a.mV[1] < b.mV[1] - || (a.mV[1] == b.mV[1]) - && a.mV[2] < b.mV[2]))); + || ((a.mV[1] == b.mV[1]) + && a.mV[2] < b.mV[2])))); } inline const LLVector3& operator+=(LLVector3 &a, const LLVector3 &b) -- cgit v1.1 From c8bd2bd6a92ad681fda6b8e142b86f233668c3de Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 7 Sep 2010 16:21:13 -0700 Subject: Removed 'prepare' dependency from cmake --- linden/indra/llmath/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/CMakeLists.txt b/linden/indra/llmath/CMakeLists.txt index c05bf1d..e5ec3e1 100644 --- a/linden/indra/llmath/CMakeLists.txt +++ b/linden/indra/llmath/CMakeLists.txt @@ -83,4 +83,3 @@ set_source_files_properties(${llmath_HEADER_FILES} list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) -add_dependencies(llmath prepare) -- cgit v1.1 From 791d4c2de7c0219392aeb625cf7940290dc1e79a Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 14 Jun 2010 12:27:35 +0200 Subject: port llprimitive from SG2.0 --- linden/indra/llmath/llsdutil_math.h | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100755 linden/indra/llmath/llsdutil_math.h (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llsdutil_math.h b/linden/indra/llmath/llsdutil_math.h new file mode 100755 index 0000000..5b64942 --- /dev/null +++ b/linden/indra/llmath/llsdutil_math.h @@ -0,0 +1,70 @@ +/** + * @file llsdutil_math.h + * @author Brad + * @date 2009-05-19 + * @brief Utility classes, functions, etc, for using structured data with math classes. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009-2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLSDUTIL_MATH_H +#define LL_LLSDUTIL_MATH_H + +class LL_COMMON_API LLSD; + +// vector3 +class LLVector3; +LLSD ll_sd_from_vector3(const LLVector3& vec); +LLVector3 ll_vector3_from_sd(const LLSD& sd, S32 start_index = 0); + +// vector4 +class LLVector4; +LLSD ll_sd_from_vector4(const LLVector4& vec); +LLVector4 ll_vector4_from_sd(const LLSD& sd, S32 start_index = 0); + +// vector3d (double) +class LLVector3d; +LLSD ll_sd_from_vector3d(const LLVector3d& vec); +LLVector3d ll_vector3d_from_sd(const LLSD& sd, S32 start_index = 0); + +// vector2 +class LLVector2; +LLSD ll_sd_from_vector2(const LLVector2& vec); +LLVector2 ll_vector2_from_sd(const LLSD& sd); + +// Quaternion +class LLQuaternion; +LLSD ll_sd_from_quaternion(const LLQuaternion& quat); +LLQuaternion ll_quaternion_from_sd(const LLSD& sd); + +// color4 +class LLColor4; +LLSD ll_sd_from_color4(const LLColor4& c); +LLColor4 ll_color4_from_sd(const LLSD& sd); + +#endif // LL_LLSDUTIL_MATH_H -- cgit v1.1 From 087e15e89930d51c3964329befb273ae3b2d330d Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 7 Sep 2010 13:41:02 +0200 Subject: port of LL renderpipeline/Kirstens S19 pipeline for bridging to Viewer 2 texture system --- linden/indra/llmath/llbbox.cpp | 162 ++++++++++++++++++++++++++++++++++ linden/indra/llmath/llbbox.h | 103 +++++++++++++++++++++ linden/indra/llmath/llcamera.cpp | 24 +++++ linden/indra/llmath/llcamera.h | 16 +++- linden/indra/llmath/llmath.h | 2 +- linden/indra/llmath/llmodularmath.cpp | 36 ++++++++ linden/indra/llmath/llvolume.cpp | 14 +-- 7 files changed, 345 insertions(+), 12 deletions(-) create mode 100644 linden/indra/llmath/llbbox.cpp create mode 100644 linden/indra/llmath/llbbox.h create mode 100644 linden/indra/llmath/llmodularmath.cpp (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llbbox.cpp b/linden/indra/llmath/llbbox.cpp new file mode 100644 index 0000000..f0ec010 --- /dev/null +++ b/linden/indra/llmath/llbbox.cpp @@ -0,0 +1,162 @@ +/** + * @file llbbox.cpp + * @brief General purpose bounding box class (Not axis aligned) + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2010, /linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by /linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and /linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL /linden LAB SOURCE CODE IS PROVIDED "AS IS." /linden LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +// self include +#include "llbbox.h" + +// library includes +#include "m4math.h" + +void LLBBox::addPointLocal(const LLVector3& p) +{ + if (mEmpty) + { + mMinLocal = p; + mMaxLocal = p; + mEmpty = FALSE; + } + else + { + mMinLocal.mV[VX] = llmin( p.mV[VX], mMinLocal.mV[VX] ); + mMinLocal.mV[VY] = llmin( p.mV[VY], mMinLocal.mV[VY] ); + mMinLocal.mV[VZ] = llmin( p.mV[VZ], mMinLocal.mV[VZ] ); + mMaxLocal.mV[VX] = llmax( p.mV[VX], mMaxLocal.mV[VX] ); + mMaxLocal.mV[VY] = llmax( p.mV[VY], mMaxLocal.mV[VY] ); + mMaxLocal.mV[VZ] = llmax( p.mV[VZ], mMaxLocal.mV[VZ] ); + } +} + +void LLBBox::addPointAgent( LLVector3 p) +{ + p -= mPosAgent; + p.rotVec( ~mRotation ); + addPointLocal( p ); +} + + +void LLBBox::addBBoxAgent(const LLBBox& b) +{ + if (mEmpty) + { + mPosAgent = b.mPosAgent; + mRotation = b.mRotation; + mMinLocal.clearVec(); + mMaxLocal.clearVec(); + } + LLVector3 vertex[8]; + vertex[0].setVec( b.mMinLocal.mV[VX], b.mMinLocal.mV[VY], b.mMinLocal.mV[VZ] ); + vertex[1].setVec( b.mMinLocal.mV[VX], b.mMinLocal.mV[VY], b.mMaxLocal.mV[VZ] ); + vertex[2].setVec( b.mMinLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMinLocal.mV[VZ] ); + vertex[3].setVec( b.mMinLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMaxLocal.mV[VZ] ); + vertex[4].setVec( b.mMaxLocal.mV[VX], b.mMinLocal.mV[VY], b.mMinLocal.mV[VZ] ); + vertex[5].setVec( b.mMaxLocal.mV[VX], b.mMinLocal.mV[VY], b.mMaxLocal.mV[VZ] ); + vertex[6].setVec( b.mMaxLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMinLocal.mV[VZ] ); + vertex[7].setVec( b.mMaxLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMaxLocal.mV[VZ] ); + + LLMatrix4 m( b.mRotation ); + m.translate( b.mPosAgent ); + m.translate( -mPosAgent ); + m.rotate( ~mRotation ); + + for( S32 i=0; i<8; i++ ) + { + addPointLocal( vertex[i] * m ); + } +} + + +void LLBBox::expand( F32 delta ) +{ + mMinLocal.mV[VX] -= delta; + mMinLocal.mV[VY] -= delta; + mMinLocal.mV[VZ] -= delta; + mMaxLocal.mV[VX] += delta; + mMaxLocal.mV[VY] += delta; + mMaxLocal.mV[VZ] += delta; +} + +LLVector3 LLBBox::localToAgent(const LLVector3& v) const +{ + LLMatrix4 m( mRotation ); + m.translate( mPosAgent ); + return v * m; +} + +LLVector3 LLBBox::agentToLocal(const LLVector3& v) const +{ + LLMatrix4 m; + m.translate( -mPosAgent ); + m.rotate( ~mRotation ); // inverse rotation + return v * m; +} + +LLVector3 LLBBox::localToAgentBasis(const LLVector3& v) const +{ + LLMatrix4 m( mRotation ); + return v * m; +} + +LLVector3 LLBBox::agentToLocalBasis(const LLVector3& v) const +{ + LLMatrix4 m( ~mRotation ); // inverse rotation + return v * m; +} + +BOOL LLBBox::containsPointLocal(const LLVector3& p) const +{ + if ( (p.mV[VX] < mMinLocal.mV[VX]) + ||(p.mV[VX] > mMaxLocal.mV[VX]) + ||(p.mV[VY] < mMinLocal.mV[VY]) + ||(p.mV[VY] > mMaxLocal.mV[VY]) + ||(p.mV[VZ] < mMinLocal.mV[VZ]) + ||(p.mV[VZ] > mMaxLocal.mV[VZ])) + { + return FALSE; + } + return TRUE; +} + +BOOL LLBBox::containsPointAgent(const LLVector3& p) const +{ + LLVector3 point_local = agentToLocal(p); + return containsPointLocal(point_local); +} + + +/* +LLBBox operator*(const LLBBox &a, const LLMatrix4 &b) +{ + return LLBBox( a.mMin * b, a.mMax * b ); +} +*/ diff --git a/linden/indra/llmath/llbbox.h b/linden/indra/llmath/llbbox.h new file mode 100644 index 0000000..3559284 --- /dev/null +++ b/linden/indra/llmath/llbbox.h @@ -0,0 +1,103 @@ +/** + * @file llbbox.h + * @brief General purpose bounding box class + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2010, /linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by /linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and /linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL /linden LAB SOURCE CODE IS PROVIDED "AS IS." /linden LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_BBOX_H +#define LL_BBOX_H + +#include "v3math.h" +#include "llquaternion.h" + +// Note: "local space" for an LLBBox is defined relative to agent space in terms of +// a translation followed by a rotation. There is no scale term since the LLBBox's min and +// max are not necessarily symetrical and define their own extents. + +class LLBBox +{ +public: + LLBBox() {mEmpty = TRUE;} + LLBBox( const LLVector3& pos_agent, + const LLQuaternion& rot, + const LLVector3& min_local, + const LLVector3& max_local ) + : + mMinLocal( min_local ), mMaxLocal( max_local ), mPosAgent(pos_agent), mRotation( rot), mEmpty( TRUE ) + {} + + // Default copy constructor is OK. + + const LLVector3& getPositionAgent() const { return mPosAgent; } + const LLQuaternion& getRotation() const { return mRotation; } + + const LLVector3& getMinLocal() const { return mMinLocal; } + void setMinLocal( const LLVector3& min ) { mMinLocal = min; } + + const LLVector3& getMaxLocal() const { return mMaxLocal; } + void setMaxLocal( const LLVector3& max ) { mMaxLocal = max; } + + LLVector3 getCenterLocal() const { return (mMaxLocal - mMinLocal) * 0.5f + mMinLocal; } + LLVector3 getCenterAgent() const { return localToAgent( getCenterLocal() ); } + + LLVector3 getExtentLocal() const { return mMaxLocal - mMinLocal; } + + BOOL containsPointLocal(const LLVector3& p) const; + BOOL containsPointAgent(const LLVector3& p) const; + + void addPointAgent(LLVector3 p); + void addBBoxAgent(const LLBBox& b); + + void addPointLocal(const LLVector3& p); + void addBBoxLocal(const LLBBox& b) { addPointLocal( b.mMinLocal ); addPointLocal( b.mMaxLocal ); } + + void expand( F32 delta ); + + LLVector3 localToAgent( const LLVector3& v ) const; + LLVector3 agentToLocal( const LLVector3& v ) const; + + // Changes rotation but not position + LLVector3 localToAgentBasis(const LLVector3& v) const; + LLVector3 agentToLocalBasis(const LLVector3& v) const; + + +// friend LLBBox operator*(const LLBBox& a, const LLMatrix4& b); + +private: + LLVector3 mMinLocal; + LLVector3 mMaxLocal; + LLVector3 mPosAgent; // Position relative to Agent's Region + LLQuaternion mRotation; + BOOL mEmpty; // Nothing has been added to this bbox yet +}; + +//LLBBox operator*(const LLBBox &a, const LLMatrix4 &b); + + +#endif // LL_BBOX_H diff --git a/linden/indra/llmath/llcamera.cpp b/linden/indra/llmath/llcamera.cpp index 0f343bc..0609e2f 100644 --- a/linden/indra/llmath/llcamera.cpp +++ b/linden/indra/llmath/llcamera.cpp @@ -246,6 +246,10 @@ S32 LLCamera::AABBInFrustum(const LLVector3 ¢er, const LLVector3& radius) for (U32 i = 0; i < mPlaneCount; i++) { mask = mAgentPlanes[i].mask; + if (mask == 0xff) + { + continue; + } LLPlane p = mAgentPlanes[i].p; LLVector3 n = LLVector3(p); float d = p.mV[3]; @@ -294,6 +298,10 @@ S32 LLCamera::AABBInFrustumNoFarClip(const LLVector3 ¢er, const LLVector3& r } mask = mAgentPlanes[i].mask; + if (mask == 0xff) + { + continue; + } LLPlane p = mAgentPlanes[i].p; LLVector3 n = LLVector3(p); float d = p.mV[3]; @@ -437,6 +445,11 @@ int LLCamera::sphereInFrustum(const LLVector3 &sphere_center, const F32 radius) int res = 2; for (int i = 0; i < 6; i++) { + if (mAgentPlanes[i].mask == 0xff) + { + continue; + } + float d = mAgentPlanes[i].p.dist(sphere_center); if (d > radius) @@ -622,6 +635,17 @@ U8 LLCamera::calcPlaneMask(const LLPlane& plane) return mask; } +void LLCamera::ignoreAgentFrustumPlane(S32 idx) +{ + if (idx < 0 || idx > (S32) mPlaneCount) + { + return; + } + + mAgentPlanes[idx].mask = 0xff; + mAgentPlanes[idx].p.clearVec(); +} + void LLCamera::calcAgentFrustumPlanes(LLVector3* frust) { diff --git a/linden/indra/llmath/llcamera.h b/linden/indra/llmath/llcamera.h index 23ee115..0c81067 100644 --- a/linden/indra/llmath/llcamera.h +++ b/linden/indra/llmath/llcamera.h @@ -93,6 +93,17 @@ public: PLANE_TOP_MASK = (1<generate(mParams.getPathParams(), sculpt_detail, 0, TRUE, requested_sizeS); - mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), sculpt_detail, 0, TRUE, requested_sizeT); + mPathp->generate(mParams.getPathParams(), mDetail, 0, TRUE, requested_sizeS); + mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), mDetail, 0, TRUE, requested_sizeT); S32 sizeS = mPathp->mPath.size(); // we requested a specific size, now see what we really got S32 sizeT = mProfilep->mProfile.size(); // we requested a specific size, now see what we really got @@ -4274,7 +4268,7 @@ LLFaceID LLVolume::generateFaceMask() } break; default: - llerrs << "Unknown profile!" << llendl + llerrs << "Unknown profile!" << llendl; break; } -- cgit v1.1 From cf47ba8754b6a8928efed885913ccbca5fad77a8 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 28 Sep 2010 03:06:39 +0200 Subject: RED-556: SNOW-800: Massively duplicated objects See http://redmine.imprudenceviewer.org/issues/556 --- linden/indra/llmath/llcamera.cpp | 1 + linden/indra/llmath/llcamera.h | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llcamera.cpp b/linden/indra/llmath/llcamera.cpp index 0f343bc..e6b6797 100644 --- a/linden/indra/llmath/llcamera.cpp +++ b/linden/indra/llmath/llcamera.cpp @@ -684,6 +684,7 @@ void LLCamera::calculateFrustumPlanes(F32 left, F32 right, F32 top, F32 bottom) mLocalPlanes[PLANE_BOTTOM].setVec( a, c, b); //calculate center and radius squared of frustum in world absolute coordinates + static LLVector3 const X_AXIS(1.f, 0.f, 0.f); mFrustCenter = X_AXIS*mFarPlane*0.5f; mFrustCenter = transformToAbsolute(mFrustCenter); mFrustRadiusSquared = mFarPlane*0.5f; diff --git a/linden/indra/llmath/llcamera.h b/linden/indra/llmath/llcamera.h index 23ee115..85b93df 100644 --- a/linden/indra/llmath/llcamera.h +++ b/linden/indra/llmath/llcamera.h @@ -56,15 +56,6 @@ const F32 MIN_FAR_PLANE = 0.2f; static const F32 MIN_FIELD_OF_VIEW = 5.0f * DEG_TO_RAD; static const F32 MAX_FIELD_OF_VIEW = 175.f * DEG_TO_RAD; -static const LLVector3 X_AXIS(1.f,0.f,0.f); -static const LLVector3 Y_AXIS(0.f,1.f,0.f); -static const LLVector3 Z_AXIS(0.f,0.f,1.f); - -static const LLVector3 NEG_X_AXIS(-1.f,0.f,0.f); -static const LLVector3 NEG_Y_AXIS(0.f,-1.f,0.f); -static const LLVector3 NEG_Z_AXIS(0.f,0.f,-1.f); - - // An LLCamera is an LLCoorFrame with a view frustum. // This means that it has several methods for moving it around // that are inherited from the LLCoordFrame() class : -- cgit v1.1 From b5b6e556ed7e9fa6bdea2365e82765981ee9f28c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Thu, 30 Sep 2010 02:17:43 +0200 Subject: SNOW-86: Dangerous macro leads to possible wrong code See http://redmine.imprudenceviewer.org/issues/571 This patch appeared to already have been partially applied. I added more semi-colons after all llendl (and LLENDL) macros, and wrapped the lllog ... llendl construct into do { ... } while(0) as is usual for macros that mimic a single statement. The patch was double checked with regular expression greps and a compile. --- linden/indra/llmath/llvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 4c94a52..b9b9e0b 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -4268,7 +4268,7 @@ LLFaceID LLVolume::generateFaceMask() } break; default: - llerrs << "Unknown profile!" << llendl + llerrs << "Unknown profile!" << llendl; break; } -- cgit v1.1 From b3b30285126289f54b57bd42569bb0721e40e088 Mon Sep 17 00:00:00 2001 From: Robin Cornelius Date: Sun, 10 Oct 2010 22:10:33 +0100 Subject: Revert "port of LL renderpipeline/Kirstens S19 pipeline for bridging to Viewer 2 texture system" This reverts commit 087e15e89930d51c3964329befb273ae3b2d330d. Conflicts: linden/indra/newview/llsurface.cpp linden/indra/newview/llviewerwindow.cpp linden/indra/newview/llvoavatar.cpp linden/indra/newview/pipeline.cpp linden/indra/newview/pipeline.h --- linden/indra/llmath/llbbox.cpp | 162 ---------------------------------- linden/indra/llmath/llbbox.h | 103 --------------------- linden/indra/llmath/llcamera.cpp | 24 ----- linden/indra/llmath/llcamera.h | 16 +--- linden/indra/llmath/llmath.h | 2 +- linden/indra/llmath/llmodularmath.cpp | 36 -------- linden/indra/llmath/llvolume.cpp | 14 ++- 7 files changed, 12 insertions(+), 345 deletions(-) delete mode 100644 linden/indra/llmath/llbbox.cpp delete mode 100644 linden/indra/llmath/llbbox.h delete mode 100644 linden/indra/llmath/llmodularmath.cpp (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llbbox.cpp b/linden/indra/llmath/llbbox.cpp deleted file mode 100644 index f0ec010..0000000 --- a/linden/indra/llmath/llbbox.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @file llbbox.cpp - * @brief General purpose bounding box class (Not axis aligned) - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2010, /linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by /linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and /linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL /linden LAB SOURCE CODE IS PROVIDED "AS IS." /linden LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "linden_common.h" - -// self include -#include "llbbox.h" - -// library includes -#include "m4math.h" - -void LLBBox::addPointLocal(const LLVector3& p) -{ - if (mEmpty) - { - mMinLocal = p; - mMaxLocal = p; - mEmpty = FALSE; - } - else - { - mMinLocal.mV[VX] = llmin( p.mV[VX], mMinLocal.mV[VX] ); - mMinLocal.mV[VY] = llmin( p.mV[VY], mMinLocal.mV[VY] ); - mMinLocal.mV[VZ] = llmin( p.mV[VZ], mMinLocal.mV[VZ] ); - mMaxLocal.mV[VX] = llmax( p.mV[VX], mMaxLocal.mV[VX] ); - mMaxLocal.mV[VY] = llmax( p.mV[VY], mMaxLocal.mV[VY] ); - mMaxLocal.mV[VZ] = llmax( p.mV[VZ], mMaxLocal.mV[VZ] ); - } -} - -void LLBBox::addPointAgent( LLVector3 p) -{ - p -= mPosAgent; - p.rotVec( ~mRotation ); - addPointLocal( p ); -} - - -void LLBBox::addBBoxAgent(const LLBBox& b) -{ - if (mEmpty) - { - mPosAgent = b.mPosAgent; - mRotation = b.mRotation; - mMinLocal.clearVec(); - mMaxLocal.clearVec(); - } - LLVector3 vertex[8]; - vertex[0].setVec( b.mMinLocal.mV[VX], b.mMinLocal.mV[VY], b.mMinLocal.mV[VZ] ); - vertex[1].setVec( b.mMinLocal.mV[VX], b.mMinLocal.mV[VY], b.mMaxLocal.mV[VZ] ); - vertex[2].setVec( b.mMinLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMinLocal.mV[VZ] ); - vertex[3].setVec( b.mMinLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMaxLocal.mV[VZ] ); - vertex[4].setVec( b.mMaxLocal.mV[VX], b.mMinLocal.mV[VY], b.mMinLocal.mV[VZ] ); - vertex[5].setVec( b.mMaxLocal.mV[VX], b.mMinLocal.mV[VY], b.mMaxLocal.mV[VZ] ); - vertex[6].setVec( b.mMaxLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMinLocal.mV[VZ] ); - vertex[7].setVec( b.mMaxLocal.mV[VX], b.mMaxLocal.mV[VY], b.mMaxLocal.mV[VZ] ); - - LLMatrix4 m( b.mRotation ); - m.translate( b.mPosAgent ); - m.translate( -mPosAgent ); - m.rotate( ~mRotation ); - - for( S32 i=0; i<8; i++ ) - { - addPointLocal( vertex[i] * m ); - } -} - - -void LLBBox::expand( F32 delta ) -{ - mMinLocal.mV[VX] -= delta; - mMinLocal.mV[VY] -= delta; - mMinLocal.mV[VZ] -= delta; - mMaxLocal.mV[VX] += delta; - mMaxLocal.mV[VY] += delta; - mMaxLocal.mV[VZ] += delta; -} - -LLVector3 LLBBox::localToAgent(const LLVector3& v) const -{ - LLMatrix4 m( mRotation ); - m.translate( mPosAgent ); - return v * m; -} - -LLVector3 LLBBox::agentToLocal(const LLVector3& v) const -{ - LLMatrix4 m; - m.translate( -mPosAgent ); - m.rotate( ~mRotation ); // inverse rotation - return v * m; -} - -LLVector3 LLBBox::localToAgentBasis(const LLVector3& v) const -{ - LLMatrix4 m( mRotation ); - return v * m; -} - -LLVector3 LLBBox::agentToLocalBasis(const LLVector3& v) const -{ - LLMatrix4 m( ~mRotation ); // inverse rotation - return v * m; -} - -BOOL LLBBox::containsPointLocal(const LLVector3& p) const -{ - if ( (p.mV[VX] < mMinLocal.mV[VX]) - ||(p.mV[VX] > mMaxLocal.mV[VX]) - ||(p.mV[VY] < mMinLocal.mV[VY]) - ||(p.mV[VY] > mMaxLocal.mV[VY]) - ||(p.mV[VZ] < mMinLocal.mV[VZ]) - ||(p.mV[VZ] > mMaxLocal.mV[VZ])) - { - return FALSE; - } - return TRUE; -} - -BOOL LLBBox::containsPointAgent(const LLVector3& p) const -{ - LLVector3 point_local = agentToLocal(p); - return containsPointLocal(point_local); -} - - -/* -LLBBox operator*(const LLBBox &a, const LLMatrix4 &b) -{ - return LLBBox( a.mMin * b, a.mMax * b ); -} -*/ diff --git a/linden/indra/llmath/llbbox.h b/linden/indra/llmath/llbbox.h deleted file mode 100644 index 3559284..0000000 --- a/linden/indra/llmath/llbbox.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @file llbbox.h - * @brief General purpose bounding box class - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2010, /linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by /linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and /linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL /linden LAB SOURCE CODE IS PROVIDED "AS IS." /linden LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#ifndef LL_BBOX_H -#define LL_BBOX_H - -#include "v3math.h" -#include "llquaternion.h" - -// Note: "local space" for an LLBBox is defined relative to agent space in terms of -// a translation followed by a rotation. There is no scale term since the LLBBox's min and -// max are not necessarily symetrical and define their own extents. - -class LLBBox -{ -public: - LLBBox() {mEmpty = TRUE;} - LLBBox( const LLVector3& pos_agent, - const LLQuaternion& rot, - const LLVector3& min_local, - const LLVector3& max_local ) - : - mMinLocal( min_local ), mMaxLocal( max_local ), mPosAgent(pos_agent), mRotation( rot), mEmpty( TRUE ) - {} - - // Default copy constructor is OK. - - const LLVector3& getPositionAgent() const { return mPosAgent; } - const LLQuaternion& getRotation() const { return mRotation; } - - const LLVector3& getMinLocal() const { return mMinLocal; } - void setMinLocal( const LLVector3& min ) { mMinLocal = min; } - - const LLVector3& getMaxLocal() const { return mMaxLocal; } - void setMaxLocal( const LLVector3& max ) { mMaxLocal = max; } - - LLVector3 getCenterLocal() const { return (mMaxLocal - mMinLocal) * 0.5f + mMinLocal; } - LLVector3 getCenterAgent() const { return localToAgent( getCenterLocal() ); } - - LLVector3 getExtentLocal() const { return mMaxLocal - mMinLocal; } - - BOOL containsPointLocal(const LLVector3& p) const; - BOOL containsPointAgent(const LLVector3& p) const; - - void addPointAgent(LLVector3 p); - void addBBoxAgent(const LLBBox& b); - - void addPointLocal(const LLVector3& p); - void addBBoxLocal(const LLBBox& b) { addPointLocal( b.mMinLocal ); addPointLocal( b.mMaxLocal ); } - - void expand( F32 delta ); - - LLVector3 localToAgent( const LLVector3& v ) const; - LLVector3 agentToLocal( const LLVector3& v ) const; - - // Changes rotation but not position - LLVector3 localToAgentBasis(const LLVector3& v) const; - LLVector3 agentToLocalBasis(const LLVector3& v) const; - - -// friend LLBBox operator*(const LLBBox& a, const LLMatrix4& b); - -private: - LLVector3 mMinLocal; - LLVector3 mMaxLocal; - LLVector3 mPosAgent; // Position relative to Agent's Region - LLQuaternion mRotation; - BOOL mEmpty; // Nothing has been added to this bbox yet -}; - -//LLBBox operator*(const LLBBox &a, const LLMatrix4 &b); - - -#endif // LL_BBOX_H diff --git a/linden/indra/llmath/llcamera.cpp b/linden/indra/llmath/llcamera.cpp index 9c37fcf..e6b6797 100644 --- a/linden/indra/llmath/llcamera.cpp +++ b/linden/indra/llmath/llcamera.cpp @@ -246,10 +246,6 @@ S32 LLCamera::AABBInFrustum(const LLVector3 ¢er, const LLVector3& radius) for (U32 i = 0; i < mPlaneCount; i++) { mask = mAgentPlanes[i].mask; - if (mask == 0xff) - { - continue; - } LLPlane p = mAgentPlanes[i].p; LLVector3 n = LLVector3(p); float d = p.mV[3]; @@ -298,10 +294,6 @@ S32 LLCamera::AABBInFrustumNoFarClip(const LLVector3 ¢er, const LLVector3& r } mask = mAgentPlanes[i].mask; - if (mask == 0xff) - { - continue; - } LLPlane p = mAgentPlanes[i].p; LLVector3 n = LLVector3(p); float d = p.mV[3]; @@ -445,11 +437,6 @@ int LLCamera::sphereInFrustum(const LLVector3 &sphere_center, const F32 radius) int res = 2; for (int i = 0; i < 6; i++) { - if (mAgentPlanes[i].mask == 0xff) - { - continue; - } - float d = mAgentPlanes[i].p.dist(sphere_center); if (d > radius) @@ -635,17 +622,6 @@ U8 LLCamera::calcPlaneMask(const LLPlane& plane) return mask; } -void LLCamera::ignoreAgentFrustumPlane(S32 idx) -{ - if (idx < 0 || idx > (S32) mPlaneCount) - { - return; - } - - mAgentPlanes[idx].mask = 0xff; - mAgentPlanes[idx].p.clearVec(); -} - void LLCamera::calcAgentFrustumPlanes(LLVector3* frust) { diff --git a/linden/indra/llmath/llcamera.h b/linden/indra/llmath/llcamera.h index 8d3ad08..85b93df 100644 --- a/linden/indra/llmath/llcamera.h +++ b/linden/indra/llmath/llcamera.h @@ -84,17 +84,6 @@ public: PLANE_TOP_MASK = (1<generate(mParams.getPathParams(), mDetail, 0, TRUE, requested_sizeS); - mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), mDetail, 0, TRUE, requested_sizeT); + mPathp->generate(mParams.getPathParams(), sculpt_detail, 0, TRUE, requested_sizeS); + mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), sculpt_detail, 0, TRUE, requested_sizeT); S32 sizeS = mPathp->mPath.size(); // we requested a specific size, now see what we really got S32 sizeT = mProfilep->mProfile.size(); // we requested a specific size, now see what we really got @@ -4268,7 +4274,7 @@ LLFaceID LLVolume::generateFaceMask() } break; default: - llerrs << "Unknown profile!" << llendl; + llerrs << "Unknown profile!" << llendl break; } -- cgit v1.1 From 0bf2f0afa632a379a32f08cf9b3e77f76c3a13da Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 15 Oct 2010 17:58:59 +0200 Subject: Add missing semi-colon. --- linden/indra/llmath/llvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index b0b8a94..c4c3f07 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -4274,7 +4274,7 @@ LLFaceID LLVolume::generateFaceMask() } break; default: - llerrs << "Unknown profile!" << llendl + llerrs << "Unknown profile!" << llendl; break; } -- cgit v1.1 From b2d616b732943817b7e705fc8f6c4be9beee3def Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 15 Oct 2010 18:02:40 +0200 Subject: Rename LLRect::isNull to LLRect::isEmpty (a random thing I picked up from snowglobe 2.x). --- linden/indra/llmath/llrect.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llrect.h b/linden/indra/llmath/llrect.h index 9eb58db..33070c4 100644 --- a/linden/indra/llmath/llrect.h +++ b/linden/indra/llmath/llrect.h @@ -229,14 +229,14 @@ public: return mLeft <= mRight && mBottom <= mTop; } - bool isNull() const + bool isEmpty() const { return mLeft == mRight || mBottom == mTop; } bool notNull() const { - return !isNull(); + return !isEmpty(); } LLRectBase& unionWith(const LLRectBase &other) -- cgit v1.1 From 5b4356cefbaa7dbdc8656e7283c110a893b1a89c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 7 Nov 2010 16:55:50 +0100 Subject: IMP-692: SNOW-713: Global objects in libllcommon duplicated in plugins See http://jira.secondlife.com/browse/SNOW-713 This patch makes llcommon shared. It contains the following snowglobe (SVN) changesets: 3478, 3479, 3480, 3481, 3482, 3485, 3496, 3498, 3500, 3519 and 3531, plus the fix for all rejects. Note that changes to scripts/automated_build_scripts/opensrc-build.sh (changesets 3500 and 3625) were ignored as we don't have scripts/automated_build_scripts. --- linden/indra/llmath/lloctree.h | 6 ++---- linden/indra/llmath/lltreenode.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/lloctree.h b/linden/indra/llmath/lloctree.h index bced84c..2029554 100644 --- a/linden/indra/llmath/lloctree.h +++ b/linden/indra/llmath/lloctree.h @@ -68,8 +68,7 @@ template class LLOctreeTraveler : public LLTreeTraveler { public: - virtual void traverse(const LLTreeNode* node); - virtual void visit(const LLTreeNode* state) { } + virtual void traverse(const LLOctreeNode* node); virtual void visit(const LLOctreeNode* branch) = 0; }; @@ -705,9 +704,8 @@ public: // LLOctreeTraveler //======================== template -void LLOctreeTraveler::traverse(const LLTreeNode* tree_node) +void LLOctreeTraveler::traverse(const LLOctreeNode* node) { - const LLOctreeNode* node = (const LLOctreeNode*) tree_node; node->accept(this); for (U32 i = 0; i < node->getChildCount(); i++) { diff --git a/linden/indra/llmath/lltreenode.h b/linden/indra/llmath/lltreenode.h index ee98362..ccbeda5 100644 --- a/linden/indra/llmath/lltreenode.h +++ b/linden/indra/llmath/lltreenode.h @@ -82,8 +82,6 @@ class LLTreeTraveler { public: virtual ~LLTreeTraveler() { }; - virtual void traverse(const LLTreeNode* node) = 0; - virtual void visit(const LLTreeNode* node) = 0; }; template -- cgit v1.1 From b66950bc26cfb3210e786c966141b20a5cc13a84 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 10 Nov 2010 15:19:13 +0100 Subject: IMP-590: Added a thread-safe and robust wrapper for APR pools. See http://redmine.imprudenceviewer.org/issues/590 --- linden/indra/llmath/llvolumemgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llvolumemgr.cpp b/linden/indra/llmath/llvolumemgr.cpp index 53641fc..8bfebcb 100644 --- a/linden/indra/llmath/llvolumemgr.cpp +++ b/linden/indra/llmath/llvolumemgr.cpp @@ -55,7 +55,7 @@ LLVolumeMgr::LLVolumeMgr() { // the LLMutex magic interferes with easy unit testing, // so you now must manually call useMutex() to use it - //mDataMutex = new LLMutex(gAPRPoolp); + //mDataMutex = new LLMutex; } LLVolumeMgr::~LLVolumeMgr() @@ -222,7 +222,7 @@ void LLVolumeMgr::useMutex() { if (!mDataMutex) { - mDataMutex = new LLMutex(gAPRPoolp); + mDataMutex = new LLMutex; } } -- cgit v1.1 From 8431725c0bf08da2b909cefe2f3ecfb43a2aecad Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 4 Apr 2011 23:01:06 -0700 Subject: Ported the GPL version of Zwagoth Klaar's fix for sculpty crashers. This has two major side effects: 1. instead of crashing on bad sculpt data, the viewer freezes for a time. 2. Sculpties can be slow to build --- linden/indra/llmath/llvolume.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index 0b9002f..77af2c4 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h @@ -949,9 +949,11 @@ public: LLVector3 mLODScaleBias; // vector for biasing LOD based on scale void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); + + F32 sculptGetSurfaceArea(); + private: void sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type); - F32 sculptGetSurfaceArea(); void sculptGeneratePlaceholder(); void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t); -- cgit v1.1 From 562b0ab82bf929ef338374f5b71ba5a3a3f5c267 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 14 Apr 2011 22:34:55 -0700 Subject: Applied lineSegmentIntersectFix from the Cool Viewer, backported from SG2 --- linden/indra/llmath/llvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/llmath') diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index c4c3f07..618048c 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -3583,7 +3583,7 @@ S32 LLVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& end, if (face == -1) // ALL_SIDES { start_face = 0; - end_face = getNumFaces() - 1; + end_face = getNumVolumeFaces() - 1; } else { -- cgit v1.1