/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGMatrix_HH_ #define _MGMatrix_HH_ /** @file */ /** @addtogroup BASE * @{ */ #include #include "mg/MGCL.h" // MGMatrix.h // Defines Class MGMatrix // // Forward Declarations class MGVector; class MGUnit_vector; class MGTransf; class MGIfstream; class MGOfstream; ///MGMatrix is a matix of m by m, where m is the space dimension. ///MGMatrix provides transformation around the origin. General transformation ///is provided by MGTransf. ///Let M be a matrix and A be an object(including MGVector). ///Then matrix transformation of the object A is defined as: A*M. (Not M*A) class MG_DLL_DECLR MGMatrix { public: ///自身のMatrixと与えられたscaleの乗算を行いオブジェクトを生成。 ///Scaling of the matrix. MG_DLL_DECLR friend MGMatrix operator* (double scale, const MGMatrix& mat); ///String stream Function MG_DLL_DECLR friend std::ostream& operator<< (std::ostream&, const MGMatrix&); //////////// Constructor //////////// ///void constructor:void コンストラクタ ///When sdim>=1, MGMatrix is initialized as a unit matrix. explicit MGMatrix(int sdim=0); /// Construct 2D matrix from two vectors. MGMatrix(const MGVector&, const MGVector&); /// Construct 3D matrix from three vectors. MGMatrix(const MGVector&, const MGVector&, const MGVector& ); /// 各軸方向で等しい Scaling のためのMatrixを生成。 ///Scaling matrix of same scaling value for each coordinate. MGMatrix(int dim, double scale); ///Construct dim dimension matrix from the array of double values. MGMatrix( int dim, ///