deMatrix6.h

Go to the documentation of this file.
00001 /* Copyright (c) 2005 Arachi, Inc. and Stanford University.
00002  *
00003  * Permission is hereby granted, free of charge, to any person obtaining
00004  * a copy of this software and associated documentation files (the
00005  * "Software"), to deal in the Software without restriction, including
00006  * without limitation the rights to use, copy, modify, merge, publish,
00007  * distribute, sublicense, and/or sell copies of the Software, and to
00008  * permit persons to whom the Software is furnished to do so, subject
00009  * to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included
00012  * in all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00015  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00016  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00017  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00018  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00019  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00020  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00021  */
00022 
00023 #ifndef _deMatrix6_h
00024 #define _deMatrix6_h
00025 
00033 class deMatrix6
00034 {
00035 public:
00037         deMatrix3* operator[](const deInt row) { return (_mat3 + row * 2); }
00039         const deMatrix3* operator[](const deInt row) const { return (_mat3 + row * 2); }
00041         DE_MATH_API deFloat& elementAt(const deInt i, const deInt j);
00043         DE_MATH_API const deFloat& elementAt(const deInt i, const deInt j) const;
00045         DE_MATH_API void operator=(const deMatrix6& m);
00047         DE_MATH_API void zero();
00049         DE_MATH_API void identity();
00051         DE_MATH_API void negate(const deMatrix6& m);
00053         DE_MATH_API void add(const deMatrix6& m1, const deMatrix6& m2);
00055         DE_MATH_API void subtract(const deMatrix6& m1, const deMatrix6& m2);
00057         DE_MATH_API void multiply(const deMatrix6& m, const deFloat s);
00059         DE_MATH_API void operator+=(const deMatrix6& m);
00061         DE_MATH_API void operator-=(const deMatrix6& m);
00063         DE_MATH_API void operator*=(const deFloat s);
00065         DE_MATH_API void transpose(const deMatrix6& m);
00067         void inverse(const deMatrix6& m);
00069         void inverseSPD(const deMatrix6& m);
00071         void ludecomp(const deMatrix6& m);
00073         void ludecompSPD(const deMatrix6& m);
00075         void multiply(const deMatrix6& m1, const deMatrix6& m2);
00077         void transposedMultiply(const deMatrix6& m1, const deMatrix6& m2);
00079         void multiplyTransposed(const deMatrix6& m1, const deMatrix6& m2);
00081         void multiplyTransposed(const deVector6& v1, const deVector6& v2);
00083         void similarityXform(const deMatrix6& L, const deMatrix6& I);
00085         void similarityXformT(const deMatrix6& L, const deMatrix6& I);
00089         //      @{
00091         DE_MATH_API void set(const deTransform& t);
00093         void xform(const deTransform& t, const deMatrix6& m);
00095         void similarityRform(const deTransform& t, const deMatrix6& L);
00097         void similarityXform(const deTransform& t, const deMatrix6& I);
00099         void similarityXformT(const deTransform& t, const deMatrix6& I);
00101         void similarityXformInv(const deTransform& t, const deMatrix6& I);
00102         //      @}
00103 
00104 private:
00105         deMatrix3 _mat3[4];
00106 };
00107 
00108 #endif // _deMatrix6_h

Generated on Sun Apr 9 22:12:42 2006 for TAO by  doxygen 1.4.6-NO