+// Copyright (C) 2006 Mathias Froehlich - Mathias.Froehlich@web.de
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+
#ifndef SGMatrix_H
#define SGMatrix_H
template<typename T>
struct TransNegRef;
-template<typename T>
-class SGMatrix;
-
/// 3D Matrix Class
template<typename T>
class SGMatrix {
return s;
}
-/// Two classes doing actually the same on different types
-typedef SGMatrix<float> SGMatrixf;
-typedef SGMatrix<double> SGMatrixd;
-
inline
SGMatrixf
toMatrixf(const SGMatrixd& m)
{
return SGMatrixf((float)m(0,0), (float)m(0,1), (float)m(0,2), (float)m(0,3),
(float)m(1,0), (float)m(1,1), (float)m(1,2), (float)m(1,3),
- (float)m(3,0), (float)m(2,1), (float)m(2,2), (float)m(2,3),
- (float)m(4,0), (float)m(4,1), (float)m(4,2), (float)m(4,3));
+ (float)m(2,0), (float)m(2,1), (float)m(2,2), (float)m(2,3),
+ (float)m(3,0), (float)m(3,1), (float)m(3,2), (float)m(3,3));
}
inline
{
return SGMatrixd(m(0,0), m(0,1), m(0,2), m(0,3),
m(1,0), m(1,1), m(1,2), m(1,3),
- m(3,0), m(2,1), m(2,2), m(2,3),
- m(4,0), m(4,1), m(4,2), m(4,3));
+ m(2,0), m(2,1), m(2,2), m(2,3),
+ m(3,0), m(3,1), m(3,2), m(3,3));
}
#endif