/////////////////////////////////////////////////////////////////////////////
-// Name: matrix.h
-// Purpose: wxTransformMatrix class. NOT YET USED
-// Author: Chris Breeze, Julian Smart
+// Name: wx/matrix.h
+// Purpose: wxTransformMatrix class. NOT YET USED
+// Author: Chris Breeze, Julian Smart
// Modified by: Klaas Holwerda
-// Created: 01/02/97
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart, Chris Breeze
-// Licence: wxWindows licence
+// Created: 01/02/97
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart, Chris Breeze
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MATRIXH__
//! headerfiles="matrix.h wx/object.h"
#include "wx/object.h"
+#include "wx/math.h"
//! codefiles="matrix.cpp"
// at a certain coordinate and angle within another parent picture.
// At all times m_isIdentity is set if the matrix itself is an Identity matrix.
// It is used where possible to optimize calculations.
-class WXDLLEXPORT wxTransformMatrix: public wxObject
+class WXDLLIMPEXP_CORE wxTransformMatrix: public wxObject
{
public:
wxTransformMatrix(void);
// Is the matrix the identity matrix?
// Only returns a flag, which is set whenever an operation
// is done.
- inline bool IsIdentity(void) const { return m_isIdentity; };
+ inline bool IsIdentity(void) const { return m_isIdentity; }
// This does an actual check.
inline bool IsIdentity1(void) const ;
inline bool wxTransformMatrix::IsIdentity1(void) const
{
return
- (m_matrix[0][0] == 1.0 &&
- m_matrix[1][1] == 1.0 &&
- m_matrix[2][2] == 1.0 &&
- m_matrix[1][0] == 0.0 &&
- m_matrix[2][0] == 0.0 &&
- m_matrix[0][1] == 0.0 &&
- m_matrix[2][1] == 0.0 &&
- m_matrix[0][2] == 0.0 &&
- m_matrix[1][2] == 0.0) ;
+ ( wxIsSameDouble(m_matrix[0][0], 1.0) &&
+ wxIsSameDouble(m_matrix[1][1], 1.0) &&
+ wxIsSameDouble(m_matrix[2][2], 1.0) &&
+ wxIsSameDouble(m_matrix[1][0], 0.0) &&
+ wxIsSameDouble(m_matrix[2][0], 0.0) &&
+ wxIsSameDouble(m_matrix[0][1], 0.0) &&
+ wxIsSameDouble(m_matrix[2][1], 0.0) &&
+ wxIsSameDouble(m_matrix[0][2], 0.0) &&
+ wxIsSameDouble(m_matrix[1][2], 0.0) );
}
// Calculates the determinant of a 2 x 2 matrix
return a11 * a22 - a12 * a21;
}
-#endif
- // _WX_MATRIXH__
+#endif // _WX_MATRIXH__