📄 martix.h
字号:
//============================================================================
//File Matrix.h
//
//============================================================================
#ifndef __MATRIX__
#define __MATRIX__
#include "Vector.h"
class Matrix
{
public:
double x[3][3];
Matrix () {};
Matrix ( double );
Matrix ( const Matrix& );
Matrix ( double, double, double,
double, double, double,
double, double, double );
Matrix& operator = ( const Matrix& );
Matrix& operator += ( const Matrix& );
Matrix& operator -= ( const Matrix& );
Matrix& operator *= ( const Matrix& );
Matrix& operator *= ( double );
Matrix& operator /= ( double );
void Invert();
void Transpose();
friend Matrix operator + ( const Matrix&, const Matrix& );
friend Matrix operator - ( const Matrix&, const Matrix& );
friend Matrix operator * ( const Matrix&,double );
friend Matrix operator * ( const Matrix&, const Matrix& );
friend Vector operator * ( const Matrix&, const Vector& );
friend Matrix operator ~ ( const Matrix& );
friend Matrix operator ! ( const Matrix& );
friend double Trace(const Matrix& m) {return (m.x[0][0]+m.x[1][1]+m.x[2][2]);};
};
const Matrix E(1.);
// Matrix Translate( const Vector& );
Matrix Scale( const Vector& );
Matrix RotateX( double );
Matrix RotateY( double );
Matrix RotateZ( double );
Matrix Rotation( const Vector& , double );
Matrix MirrorX();
Matrix MirrorY();
Matrix MirrorZ();
Matrix Symmetry( const Vector& );
Matrix AskSymmetry( const Vector& );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -