diff options
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/llmath/llsimdmath.h | 2 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 4 | ||||
-rw-r--r-- | indra/llmath/v2math.h | 6 | ||||
-rw-r--r-- | indra/llmath/v3math.h | 10 | ||||
-rw-r--r-- | indra/llmath/v4math.h | 2 |
6 files changed, 10 insertions, 16 deletions
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index c0a62ad225..e21b6fdb84 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -105,7 +105,7 @@ add_library (llmath ${llmath_SOURCE_FILES}) target_link_libraries(llmath llcommon llmeshoptimizer) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -if (USESYSTEMLIBS AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") +if (CMAKE_CXX_COMPILER_ID MATCHES GNU) set_source_files_properties(llcalc.cpp PROPERTIES COMPILE_FLAGS -Wno-dangling-pointer) endif () diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index 590d8de92f..6242095456 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -39,7 +39,7 @@ #include <stdint.h> #endif -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) || _M_X64 #include <xmmintrin.h> #include <emmintrin.h> #else diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index ca7bd8907b..d56891cab3 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -55,11 +55,7 @@ #include "mikktspace/mikktspace.hh" -#if LL_USESYSTEMLIBS #include <meshoptimizer.h> -#else -#include "meshoptimizer/meshoptimizer.h" -#endif #define DEBUG_SILHOUETTE_BINORMALS 0 #define DEBUG_SILHOUETTE_NORMALS 0 // TomY: Use this to display normals using the silhouette diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h index d9fb70e191..6b9d37535b 100644 --- a/indra/llmath/v2math.h +++ b/indra/llmath/v2math.h @@ -243,19 +243,19 @@ inline bool LLVector2::isFinite() const } // deprecated -inline F32 LLVector2::magVec(void) const +inline F32 LLVector2::magVec() const { return length(); } // deprecated -inline F32 LLVector2::magVecSquared(void) const +inline F32 LLVector2::magVecSquared() const { return lengthSquared(); } // deprecated -inline F32 LLVector2::normVec(void) +inline F32 LLVector2::normVec() { return normalize(); } diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h index baf38e4a3a..098ca5218c 100644 --- a/indra/llmath/v3math.h +++ b/indra/llmath/v3math.h @@ -264,7 +264,7 @@ inline void LLVector3::set(const LLVector3& vec) inline void LLVector3::set(const F32* vec) { - set(vec[0], vec[1], vec[2]); + set(vec[VX], vec[VY], vec[VZ]); } inline void LLVector3::set(const glm::vec4& vec) @@ -343,7 +343,7 @@ inline F32 LLVector3::magVecSquared() const return lengthSquared(); } -inline bool LLVector3::inRange( F32 min, F32 max ) const +inline bool LLVector3::inRange(F32 min, F32 max) const { return mV[VX] >= min && mV[VX] <= max && mV[VY] >= min && mV[VY] <= max && @@ -369,7 +369,7 @@ inline F32 operator*(const LLVector3& a, const LLVector3& b) inline LLVector3 operator%(const LLVector3& a, const LLVector3& b) { - return LLVector3( a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY] ); + return LLVector3(a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY]); } inline LLVector3 operator/(const LLVector3& a, F32 k) @@ -429,7 +429,7 @@ inline const LLVector3& operator-=(LLVector3& a, const LLVector3& b) inline const LLVector3& operator%=(LLVector3& a, const LLVector3& b) { - LLVector3 ret( a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY]); + LLVector3 ret(a.mV[VY]*b.mV[VZ] - b.mV[VY]*a.mV[VZ], a.mV[VZ]*b.mV[VX] - b.mV[VZ]*a.mV[VX], a.mV[VX]*b.mV[VY] - b.mV[VX]*a.mV[VY]); a = ret; return a; } @@ -477,7 +477,7 @@ inline F32 dist_vec(const LLVector3& a, const LLVector3& b) F32 x = a.mV[VX] - b.mV[VX]; F32 y = a.mV[VY] - b.mV[VY]; F32 z = a.mV[VZ] - b.mV[VZ]; - return sqrt( x*x + y*y + z*z ); + return sqrt(x*x + y*y + z*z); } inline F32 dist_vec_squared(const LLVector3& a, const LLVector3& b) diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h index d49639bd35..1cbd0d9a78 100644 --- a/indra/llmath/v4math.h +++ b/indra/llmath/v4math.h @@ -118,8 +118,6 @@ public: bool isExactlyClear() const { return (mV[VW] == 1.0f) && !mV[VX] && !mV[VY] && !mV[VZ]; } bool isExactlyZero() const { return !mV[VW] && !mV[VX] && !mV[VY] && !mV[VZ]; } - const LLVector4& rotVec(F32 angle, const LLVector4 &vec); // Rotates about vec by angle radians - const LLVector4& rotVec(F32 angle, F32 x, F32 y, F32 z); // Rotates about x,y,z by angle radians const LLVector4& rotVec(const LLMatrix4 &mat); // Rotates by MAT4 mat const LLVector4& rotVec(const LLQuaternion &q); // Rotates by QUAT q |