Subversion Repositories gelsvn

Rev

Rev 89 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef __CGLA_MAT2X2F_H
#define __CGLA_MAT2X2F_H

#include "Vec2f.h"
#include "ArithSqMat2x2Float.h"


namespace CGLA {

        /** Two by two float matrix. This class is useful for various 
                        vector transformations in the plane. */
        class Mat2x2f: public ArithSqMat2x2Float<Vec2f, Mat2x2f>
        {
        public:

                /// Construct a Mat2x2f from two Vec2f vectors.
                Mat2x2f(Vec2f _a, Vec2f _b): ArithSqMat2x2Float<Vec2f, Mat2x2f> (_a,_b) {}

                /// Construct a Mat2x2f from four scalars.
                Mat2x2f(float _a, float _b, float _c, float _d): 
                        ArithSqMat2x2Float<Vec2f, Mat2x2f>(Vec2f(_a,_b),Vec2f(_c,_d)) {}
  
                /// Construct the 0 matrix
                Mat2x2f() {}

        };

}
#endif