CrossFramework Library
|
#include <XBase/Matrix34.hpp>
3x4の32bit浮動小数行列構造体。
使用頻度のことを考えて Mtx34 という名前でもアクセスできます。 配列の並びはOpenGL準拠にしてあります。
c0 c1 c2 c3 r0 [0] [3] [6] [9] r1 [1] [4] [7] [10] r2 [2] [5] [8] [11]
インデックス値 | |
enum | { Index00 = 0, Index10 = 1, Index20 = 2, Index01 = 3, Index11 = 4, Index21 = 5, Index02 = 6, Index12 = 7, Index22 = 8, Index03 = 9, Index13 = 10, Index23 = 11, IndexXX = Index00, IndexXY = Index10, IndexXZ = Index20, IndexYX = Index01, IndexYY = Index11, IndexYZ = Index21, IndexZX = Index02, IndexZY = Index12, IndexZZ = Index22, IndexWX = Index03, IndexWY = Index13, IndexWZ = Index23 } |
行列の作成 | |
static const Matrix34POD | Identity () |
単位行列の作成。 | |
static const Matrix34POD | Translate (f32 aX, f32 aY, f32 aZ) |
平行移動行列の作成。 | |
static const Matrix34POD | Translate (const Vector3POD &aVec) |
平行移動行列の作成。 | |
static const Matrix34POD | Scale (f32 aX, f32 aY, f32 aZ) |
拡大縮小行列の作成。 | |
static const Matrix34POD | Scale (const Vector3POD &aVec) |
拡大縮小行列の作成。 | |
static const Matrix34POD | Rotate (const Angle &, f32 aAxisX, f32 aAxisY, f32 aAxisZ) |
回転行列の作成。 | |
static const Matrix34POD | Rotate (const Angle &, const Vector3POD &aAxis) |
回転行列の作成。 | |
static const Matrix34POD | LookAt (const Vector3POD &aEyePos, const Vector3POD &aTargetPos, const Vector3POD &aUpVec) |
視野変換行列の作成。 | |
f32 | v [12] |
1次元配列。 | |
変数 | |
union { | |
f32 v [12] | |
1次元配列。 | |
}; | |
XYZWアクセス(1列ごとにX,Y,Z,Wが割り当てられているとする) | |
const Vector3POD | x () const |
const Vector3POD | y () const |
const Vector3POD | z () const |
const Vector3POD | w () const |
void | setX (const Vector3POD &) |
void | setY (const Vector3POD &) |
void | setZ (const Vector3POD &) |
void | setW (const Vector3POD &) |
乗算(引数が同じオブジェクトでも問題無し) | |
const Vector3POD | mul (const Vector3POD &) const |
乗算した結果を得る。 | |
const Matrix34POD | mul (const Matrix34POD &) const |
乗算した結果を得る。 | |
Matrix34POD & | mulAssign (const Matrix34POD &) |
乗算し結果を代入する。 | |
演算子オーバーロード | |
const Vector3POD | operator* (const Vector3POD &) const |
mul() のエイリアス。 | |
const Matrix34POD | operator* (const Matrix34POD &) const |
mul() のエイリアス。 | |
Matrix34POD & | operator*= (const Matrix34POD &) |
mulAssign() のエイリアス。 | |
変換 | |
const Matrix34POD | invert () const |
逆行列を取得する。4行目は0,0,0,1として作成する。 | |
const Quaternion | toQuaternion () const |
3x3の部分をクォータニオンに変換する。 | |
const Matrix44POD | toMatrix44 () const |
4x4に変換する。4行目は0,0,0,1として作成する。 | |
デバッグ | |
void | dump () const |