diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-22 19:04:52 +0200 |
commit | 1b67dd855c41f5a0cda7ec2a68d98071986ca703 (patch) | |
tree | ab243607f74f78200787bba5b9b88f07ef1b966f /indra/llmath/llmatrix3a.h | |
parent | 6d6eabca44d08d5b97bfe3e941d2b9687c2246ea (diff) | |
parent | e1623bb276f83a43ce7a197e388720c05bdefe61 (diff) |
Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
# autobuild.xml
# indra/cmake/CMakeLists.txt
# indra/cmake/GoogleMock.cmake
# indra/llaudio/llaudioengine_fmodstudio.cpp
# indra/llaudio/llaudioengine_fmodstudio.h
# indra/llaudio/lllistener_fmodstudio.cpp
# indra/llaudio/lllistener_fmodstudio.h
# indra/llaudio/llstreamingaudio_fmodstudio.cpp
# indra/llaudio/llstreamingaudio_fmodstudio.h
# indra/llcharacter/llmultigesture.cpp
# indra/llcharacter/llmultigesture.h
# indra/llimage/llimage.cpp
# indra/llimage/llimagepng.cpp
# indra/llimage/llimageworker.cpp
# indra/llimage/tests/llimageworker_test.cpp
# indra/llmessage/tests/llmockhttpclient.h
# indra/llprimitive/llgltfmaterial.h
# indra/llrender/llfontfreetype.cpp
# indra/llui/llcombobox.cpp
# indra/llui/llfolderview.cpp
# indra/llui/llfolderviewmodel.h
# indra/llui/lllineeditor.cpp
# indra/llui/lllineeditor.h
# indra/llui/lltextbase.cpp
# indra/llui/lltextbase.h
# indra/llui/lltexteditor.cpp
# indra/llui/lltextvalidate.cpp
# indra/llui/lltextvalidate.h
# indra/llui/lluictrl.h
# indra/llui/llview.cpp
# indra/llwindow/llwindowmacosx.cpp
# indra/newview/app_settings/settings.xml
# indra/newview/llappearancemgr.cpp
# indra/newview/llappearancemgr.h
# indra/newview/llavatarpropertiesprocessor.cpp
# indra/newview/llavatarpropertiesprocessor.h
# indra/newview/llbreadcrumbview.cpp
# indra/newview/llbreadcrumbview.h
# indra/newview/llbreastmotion.cpp
# indra/newview/llbreastmotion.h
# indra/newview/llconversationmodel.h
# indra/newview/lldensityctrl.cpp
# indra/newview/lldensityctrl.h
# indra/newview/llface.inl
# indra/newview/llfloatereditsky.cpp
# indra/newview/llfloatereditwater.cpp
# indra/newview/llfloateremojipicker.h
# indra/newview/llfloaterimsessiontab.cpp
# indra/newview/llfloaterprofiletexture.cpp
# indra/newview/llfloaterprofiletexture.h
# indra/newview/llgesturemgr.cpp
# indra/newview/llgesturemgr.h
# indra/newview/llimpanel.cpp
# indra/newview/llimpanel.h
# indra/newview/llinventorybridge.cpp
# indra/newview/llinventorybridge.h
# indra/newview/llinventoryclipboard.cpp
# indra/newview/llinventoryclipboard.h
# indra/newview/llinventoryfunctions.cpp
# indra/newview/llinventoryfunctions.h
# indra/newview/llinventorygallery.cpp
# indra/newview/lllistbrowser.cpp
# indra/newview/lllistbrowser.h
# indra/newview/llpanelobjectinventory.cpp
# indra/newview/llpanelprofile.cpp
# indra/newview/llpanelprofile.h
# indra/newview/llpreviewgesture.cpp
# indra/newview/llsavedsettingsglue.cpp
# indra/newview/llsavedsettingsglue.h
# indra/newview/lltooldraganddrop.cpp
# indra/newview/llurllineeditorctrl.cpp
# indra/newview/llvectorperfoptions.cpp
# indra/newview/llvectorperfoptions.h
# indra/newview/llviewerparceloverlay.cpp
# indra/newview/llviewertexlayer.cpp
# indra/newview/llviewertexturelist.cpp
# indra/newview/macmain.h
# indra/test/test.cpp
Diffstat (limited to 'indra/llmath/llmatrix3a.h')
-rw-r--r-- | indra/llmath/llmatrix3a.h | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/indra/llmath/llmatrix3a.h b/indra/llmath/llmatrix3a.h index 9916cfd2da..dff6604ae5 100644 --- a/indra/llmath/llmatrix3a.h +++ b/indra/llmath/llmatrix3a.h @@ -1,31 +1,31 @@ -/** +/** * @file llmatrix3a.h * @brief LLMatrix3a class header file - memory aligned and vectorized 3x3 matrix * * $LicenseInfo:firstyear=2010&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -#ifndef LL_LLMATRIX3A_H -#define LL_LLMATRIX3A_H +#ifndef LL_LLMATRIX3A_H +#define LL_LLMATRIX3A_H ///////////////////////////// // LLMatrix3a, LLRotation @@ -38,91 +38,91 @@ // Huseby). ///////////////////////////// -// LLMatrix3a is the base class for LLRotation, which should be used instead any time you're dealing with a +// LLMatrix3a is the base class for LLRotation, which should be used instead any time you're dealing with a // rotation matrix. class LLMatrix3a { public: - // Utility function for quickly transforming an array of LLVector4a's - // For transforming a single LLVector4a, see LLVector4a::setRotated - static void batchTransform( const LLMatrix3a& xform, const LLVector4a* src, int numVectors, LLVector4a* dst ); + // Utility function for quickly transforming an array of LLVector4a's + // For transforming a single LLVector4a, see LLVector4a::setRotated + static void batchTransform( const LLMatrix3a& xform, const LLVector4a* src, int numVectors, LLVector4a* dst ); + + // Utility function to obtain the identity matrix + static inline const LLMatrix3a& getIdentity(); - // Utility function to obtain the identity matrix - static inline const LLMatrix3a& getIdentity(); + ////////////////////////// + // Ctors + ////////////////////////// - ////////////////////////// - // Ctors - ////////////////////////// - - // Ctor - LLMatrix3a() {} + // Ctor + LLMatrix3a() {} - // Ctor for setting by columns - inline LLMatrix3a( const LLVector4a& c0, const LLVector4a& c1, const LLVector4a& c2 ); + // Ctor for setting by columns + inline LLMatrix3a( const LLVector4a& c0, const LLVector4a& c1, const LLVector4a& c2 ); - ////////////////////////// - // Get/Set - ////////////////////////// + ////////////////////////// + // Get/Set + ////////////////////////// - // Loads from an LLMatrix3 - inline void loadu(const LLMatrix3& src); - - // Set rows - inline void setRows(const LLVector4a& r0, const LLVector4a& r1, const LLVector4a& r2); - - // Set columns - inline void setColumns(const LLVector4a& c0, const LLVector4a& c1, const LLVector4a& c2); + // Loads from an LLMatrix3 + inline void loadu(const LLMatrix3& src); - // Get the read-only access to a specified column. Valid columns are 0-2, but the - // function is unchecked. You've been warned. - inline const LLVector4a& getColumn(const U32 column) const; + // Set rows + inline void setRows(const LLVector4a& r0, const LLVector4a& r1, const LLVector4a& r2); - ///////////////////////// - // Matrix modification - ///////////////////////// - - // Set this matrix to the product of lhs and rhs ( this = lhs * rhs ) - void setMul( const LLMatrix3a& lhs, const LLMatrix3a& rhs ); + // Set columns + inline void setColumns(const LLVector4a& c0, const LLVector4a& c1, const LLVector4a& c2); - // Set this matrix to the transpose of src - inline void setTranspose(const LLMatrix3a& src); + // Get the read-only access to a specified column. Valid columns are 0-2, but the + // function is unchecked. You've been warned. + inline const LLVector4a& getColumn(const U32 column) const; - // Set this matrix to a*w + b*(1-w) - inline void setLerp(const LLMatrix3a& a, const LLMatrix3a& b, F32 w); + ///////////////////////// + // Matrix modification + ///////////////////////// - ///////////////////////// - // Matrix inspection - ///////////////////////// + // Set this matrix to the product of lhs and rhs ( this = lhs * rhs ) + void setMul( const LLMatrix3a& lhs, const LLMatrix3a& rhs ); - // Sets all 4 elements in 'dest' to the determinant of this matrix. - // If you will be using the determinant in subsequent ops with LLVector4a, use this version - inline void getDeterminant( LLVector4a& dest ) const; + // Set this matrix to the transpose of src + inline void setTranspose(const LLMatrix3a& src); - // Returns the determinant as an LLSimdScalar. Use this if you will be using the determinant - // primary for scalar operations. - inline LLSimdScalar getDeterminant() const; + // Set this matrix to a*w + b*(1-w) + inline void setLerp(const LLMatrix3a& a, const LLMatrix3a& b, F32 w); - // Returns nonzero if rows 0-2 and colums 0-2 contain no NaN or INF values. Row 3 is ignored - inline LLBool32 isFinite() const; + ///////////////////////// + // Matrix inspection + ///////////////////////// - // Returns true if this matrix is equal to 'rhs' up to 'tolerance' - inline bool isApproximatelyEqual( const LLMatrix3a& rhs, F32 tolerance = F_APPROXIMATELY_ZERO ) const; + // Sets all 4 elements in 'dest' to the determinant of this matrix. + // If you will be using the determinant in subsequent ops with LLVector4a, use this version + inline void getDeterminant( LLVector4a& dest ) const; + + // Returns the determinant as an LLSimdScalar. Use this if you will be using the determinant + // primary for scalar operations. + inline LLSimdScalar getDeterminant() const; + + // Returns nonzero if rows 0-2 and colums 0-2 contain no NaN or INF values. Row 3 is ignored + inline LLBool32 isFinite() const; + + // Returns true if this matrix is equal to 'rhs' up to 'tolerance' + inline bool isApproximatelyEqual( const LLMatrix3a& rhs, F32 tolerance = F_APPROXIMATELY_ZERO ) const; protected: - LL_ALIGN_16(LLVector4a mColumns[3]); + LL_ALIGN_16(LLVector4a mColumns[3]); }; class LLRotation : public LLMatrix3a { public: - - LLRotation() {} - - // Returns true if this rotation is orthonormal with det ~= 1 - inline bool isOkRotation() const; + + LLRotation() {} + + // Returns true if this rotation is orthonormal with det ~= 1 + inline bool isOkRotation() const; }; #endif |