/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #include "MGCLStdAfx.h" #include "mg/Vector.h" #include "mg/Unit_vector.h" #include "mg/Position.h" #include "mg/Matrix.h" #include "mg/Transf.h" #include "mg/Object.h" #if defined(_DEBUG) #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif // MGTransf.cc //Implementation of MGTransf. // // // Constructor // void constructor MGTransf::MGTransf(int dim) :m_affine(dim,1.), m_translation(dim){;} // 全てのコンポーネントを指定してTransfを生成。 MGTransf::MGTransf(const MGMatrix& mat, const MGVector& vec) :m_affine(mat),m_translation(vec) { int dim1=mat.sdim(); int dim2=vec.sdim(); if(dim1>dim2) m_translation=MGVector(dim1,vec); else if(dim1