(new in Rev2.40)
MQMatrixクラスは4x4行列を管理するクラスです。
下記の公開メンバ変数を保持しており、自由にアクセスすることができます。
class MQMatrix { public: union { float t[16]; float d[4][4]; struct { float _11, _12, _13, _14; float _21, _22, _23, _24; float _31, _32, _33, _34; float _41, _42, _43, _44; }; }; };
MQMatrix::MQMatrix();
コンストラクタです。行列内部のデータは初期化されません。
void MQMatrix::Identify();
単位行列として初期化します。
void MQMatrix::Transpose3(void);
行列のうち左上3x3成分のみを転置します。
MQPoint MQMatrix::Mult3(const MQPoint& p) const;
行列のうち左上3x3成分のみでベクトルと行列の積を計算します。
MQPoint MQMatrix::GetRow3(int r) const;
(new in Rev3.10)
行列のうち指定した行の左側3x1成分をベクトルとして取り出します。
MQPoint MQMatrix::GetColumn3(int c) const;
(new in Rev3.10)
行列のうち指定した列の上側1x3成分をベクトルとして取り出します。
MQPoint MQMatrix::SetRow3(int r, const MQPoint& p) const;
(new in Rev3.10)
行列のうち指定した行の左側3x1成分にベクトルの値を設定します。
MQPoint MQMatrix::SetColumn3(int c, const MQPoint& p) const;
(new in Rev3.10)
行列のうち指定した列の上側1x3成分にベクトルの値を設定します。
MQPoint MQMatrix::GetScaling(void) const;
SRT変換行列から拡大成分を抽出して、そのXYZごとの要素をMQPoint型として取得します。
MQAngle MQMatrix::GetRotation(void) const;
SRT変換行列から回転成分を抽出して、その角度(オイラー角)をMQAngle型として取得します。
MQPoint MQMatrix::GetTranslation(void) const;
SRT変換行列から平行移動成分を抽出して、その移動量をMQPoint型として取得します。
void MQMatrix::SetTransform(const MQPoint *scaling, const MQAngle *rotation, const MQPoint *trans);
SRT変換行列を設定します。
void MQMatrix::SetInverseTransform(const MQPoint *scaling, const MQAngle *rotation, const MQPoint *trans);
SRT変換逆行列を設定します。