matrix.h.html
//***************************************************************************
#ifndef MATRIX_H
#define MATRIX_H
//***************************************************************************
class Matrix
{
   private:
	int	nx;
	int	ny;
	int	allocateFlag;
	void allocateMem (int m, int n);
	void deAllocateMem( );

    public:
	double   **p;
	Matrix ( );		// Constructor
	Matrix (int m, int n);		// Constructor
	~Matrix ( );		// Destructor
	void Identity ();
	Matrix &Transpose ();
	Matrix &operator+ (Matrix &M1);
	Matrix &operator- (Matrix &M1);
	Matrix &operator* (Matrix &M1);
	Matrix &operator* (double k);
	Matrix &operator/ (double k);
	Matrix &operator= (const Matrix &M);
	double operator() (int i, int j);
	friend ostream &operator<< (ostream &Out, Matrix &M);

};
//***************************************************************************
#define DEG2RAD (0.01745329251994329576)
Matrix &Transpose (Matrix &M);
Matrix &xRotate (double angle);
Matrix &yRotate (double angle);
Matrix &zRotate (double angle);
Matrix &Translate (double x, double y, double z);
Matrix &Scale (double x, double y, double z);
Matrix &Perspective (double lambda);
Matrix &Identity (int n);
//***************************************************************************
#endif // MATRIX_H
//***************************************************************************