Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/Math/Vector/Matrix22.hpp

Go to the documentation of this file.
00001 /*
00002 Definition for a 2 by 2 matrix:
00003 e.g.  |1 2|
00004       |3 4|
00005 */
00006 
00007 #ifndef __J2K__Matrix22_HPP__
00008 #define __J2K__Matrix22_HPP__
00009 
00010 #include <math.h>
00011 #include <j2k/Fred/Basic.hpp>
00012 #include <j2k/Fred/StdTypes.hpp>
00013 #include <j2k/Fred/Math/Vector/Vector2.hpp>
00014 
00015 class JMatrix22 {
00016 public:
00017 
00018    inline JMatrix22();
00019    inline virtual ~JMatrix22();
00020 
00021    inline JMatrix22( const JMatrix22& src );
00022 
00023    inline void clear();
00024    inline void print();
00025    inline void identity();
00026 
00027    JMatrix22  rotz(double rad);
00028    JMatrix22  mult(const JMatrix22& mat);
00029    JVector2   mult(const JVector2& v);
00030 
00031    inline friend JVector2  operator*( JMatrix22& left, const JVector2&  v )
00032    {
00033      return left.mult( v );
00034    } 
00035 
00036    inline friend JMatrix22 operator*( JMatrix22& left, const JMatrix22& m )
00037    {
00038      return left.mult( m );
00039    }
00040 
00041 // protected:
00042 
00043    double m[4];
00044 };
00045 
00046 #endif

Generated on Sun Oct 14 18:46:14 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001