ランタイム
|
4x4行列クラス More...
#include <Matrix4x4.h>
Public Member Functions | |
Matrix4x4 (void) | |
コンストラクタ More... | |
Matrix4x4 (const Mix::Quaternion &r) | |
コンストラクタ More... | |
Matrix4x4 (const Mix::Quaternion &r, const Mix::Vector3 &t) | |
コンストラクタ More... | |
Matrix4x4 (const Mix::Vector3 &s, const Mix::Quaternion &r, const Mix::Vector3 &t) | |
コンストラクタ More... | |
Matrix4x4 (Float32 _m00, Float32 _m01, Float32 _m02, Float32 _m03, Float32 _m10, Float32 _m11, Float32 _m12, Float32 _m13, Float32 _m20, Float32 _m21, Float32 _m22, Float32 _m23, Float32 _m30, Float32 _m31, Float32 _m32, Float32 _m33) | |
コンストラクタ More... | |
Matrix4x4 (const Matrix4x4 &mm) | |
コピーコンストラクタ More... | |
Mix::Vector3 | GetScaling (void) const |
スケールを取得します More... | |
void | SetScaling (Float32 s) |
スケールを設定します More... | |
void | SetScaling (Float32 sx, Float32 sy, Float32 sz) |
スケールを設定します More... | |
void | SetScaling (const Vector3 &s) |
スケールを設定します More... | |
Mix::Quaternion | GetRotation (void) const |
回転を取得します More... | |
void | SetRotation (const Mix::Quaternion &rot) |
回転を設定します More... | |
void | SetRotationX (Float32 r) |
X軸回転を設定します More... | |
void | SetRotationY (Float32 r) |
Y軸回転を設定します More... | |
void | SetRotationZ (Float32 r) |
Z軸回転を設定します More... | |
Mix::Vector3 | GetTranslation (void) const |
平行移動を取得します More... | |
void | SetTranslation (Float32 tx, Float32 ty, Float32 tz) |
平行移動を設定します More... | |
void | SetTranslation (const Vector3 &t) |
平行移動を設定します More... | |
Mix::Vector4 | GetColumn (UInt32 index) const |
指定した列のベクトルを取得します More... | |
void | SetColumn (UInt32 index, const Mix::Vector4 &v) |
指定した列にベクトルを設定します More... | |
Mix::Vector4 | GetRow (UInt32 index) const |
指定した行のベクトルを取得します More... | |
void | SetRow (UInt32 index, const Mix::Vector4 &v) |
指定した行にベクトルを設定します More... | |
void | Inverse (void) |
自身を逆行列にします More... | |
Mix::Matrix4x4 | ToInverse (void) const |
自身の逆行列を返します More... | |
void | Transpose (void) |
自身を転置行列にします More... | |
Mix::Matrix4x4 | ToTranspose (void) const |
自身の転置行列を返します More... | |
Mix::Vector3 | ToEulerXYZ (void) const |
オイラー角(XYZ)に変換します More... | |
Mix::Vector3 | ToEulerXZY (void) const |
オイラー角(XZY)に変換します More... | |
Mix::Vector3 | ToEulerYXZ (void) const |
オイラー角(YXZ)に変換します More... | |
Mix::Vector3 | ToEulerYZX (void) const |
オイラー角(YZX)に変換します More... | |
Mix::Vector3 | ToEulerZXY (void) const |
オイラー角(ZXY)に変換します More... | |
Mix::Vector3 | ToEulerZYX (void) const |
オイラー角(ZYX)に変換します More... | |
void | Transform (Mix::Vector3 *vectors, UInt32 numVector) const |
複数のベクトルをまとめて変換します More... | |
void | Transform (const Mix::Vector3 *srcVectors, Mix::Vector3 *dstVectors, UInt32 numVector) const |
複数のベクトルをまとめて変換します More... | |
void | Transform (Mix::Vector4 *vectors, UInt32 numVector) const |
複数のベクトルをまとめて変換します More... | |
void | Transform (const Mix::Vector4 *srcVectors, Mix::Vector4 *dstVectors, UInt32 numVector) const |
複数のベクトルをまとめて変換します More... | |
Mix::Vector3 | TransformSR (const Mix::Vector3 &v) const |
ベクトルを変換します( 移動は行いません ) More... | |
void | TransformSR (Mix::Vector3 *vectors, UInt32 numVector) const |
複数ベクトルをまとめて変換します( 移動は行いません ) More... | |
void | TransformSR (const Mix::Vector3 *srcVectors, Mix::Vector3 *dstVectors, UInt32 numVector) const |
複数のベクトルをまとめて変換します( 移動は行いません ) More... | |
Mix::Vector4 | TransformSR (const Mix::Vector4 &v) const |
ベクトルを変換します( 移動は行いません ) More... | |
void | TransformSR (Mix::Vector4 *vectors, UInt32 numVector) const |
複数ベクトルをまとめて変換します( 移動は行いません ) More... | |
void | TransformSR (const Mix::Vector4 *srcVectors, Mix::Vector4 *dstVectors, UInt32 numVector) const |
複数のベクトルをまとめて変換します( 移動は行いません ) More... | |
void | Compose (const Mix::Vector3 &s, const Mix::Quaternion &r, const Mix::Vector3 &t) |
スケーリング、ローテーション、トランスレーションを指定して行列を構成します More... | |
Boolean | Decompose (Mix::Vector3 &s, Mix::Quaternion &r, Mix::Vector3 &t) const |
スケーリング、ローテーション、トランスレーションに分解します More... | |
Mix::Matrix4x4 | Remake (Boolean bScaling, Boolean bRotation, Boolean bTranslation) const |
指定した成分で行列を再構成します More... | |
Boolean | operator== (const Matrix4x4 &mat) const |
等価比較 More... | |
Boolean | operator!= (const Matrix4x4 &mat) const |
等価比較 More... | |
Matrix4x4 & | operator= (const Matrix4x4 &m) |
行列を代入します More... | |
Matrix4x4 & | operator*= (const Matrix4x4 &m) |
行列同士を乗算します More... | |
Matrix4x4 | operator* (const Matrix4x4 &m) const |
行列同士を乗算します More... | |
Vector3 | operator* (const Vector3 &v) const |
ベクトルを変換します More... | |
Vector4 | operator* (const Vector4 &v) const |
ベクトルを変換します More... | |
Static Public Member Functions | |
static void | LookAtLH (const Mix::Vector3 &eye, const Mix::Vector3 &at, const Mix::Vector3 &up, Mix::Matrix4x4 &mat) |
左手座標系のビュー行列を作成します More... | |
static void | LookAtLH (const Mix::Quaternion &rot, const Mix::Vector3 &at, Float32 dist, Mix::Matrix4x4 &mat) |
左手座標系のビュー行列を作成します More... | |
static void | PerspectiveFovLH (Float32 fovY, Float32 aspect, Float32 nearZ, Float32 farZ, Mix::Matrix4x4 &mat) |
左手座標系の射影行列を作成します More... | |
static void | OrthoLH (Float32 width, Float32 height, Float32 nearZ, Float32 farZ, Mix::Matrix4x4 &mat) |
左手座標系の正射影行列を作成します More... | |
static void | OrthoOffCenterLH (const Mix::Vector3 &min, const Mix::Vector3 &max, Mix::Matrix4x4 &mat) |
左手座標系の正射影行列を作成します More... | |
static const Matrix4x4 & | Zero (void) |
全ての要素が 0.0f の行列を取得します More... | |
static const Matrix4x4 & | Identity (void) |
単位行列を取得します More... | |
Public Attributes | |
union { | |
struct { | |
Float32 m00 | |
要素 ( 0, 0 ) の値 More... | |
Float32 m01 | |
要素 ( 0, 1 ) の値 More... | |
Float32 m02 | |
要素 ( 0, 2 ) の値 More... | |
Float32 m03 | |
要素 ( 0, 3 ) の値 More... | |
Float32 m10 | |
要素 ( 1, 0 ) の値 More... | |
Float32 m11 | |
要素 ( 1, 1 ) の値 More... | |
Float32 m12 | |
要素 ( 1, 2 ) の値 More... | |
Float32 m13 | |
要素 ( 1, 3 ) の値 More... | |
Float32 m20 | |
要素 ( 2, 0 ) の値 More... | |
Float32 m21 | |
要素 ( 2, 1 ) の値 More... | |
Float32 m22 | |
要素 ( 2, 2 ) の値 More... | |
Float32 m23 | |
要素 ( 2, 3 ) の値 More... | |
Float32 m30 | |
要素 ( 3, 0 ) の値 More... | |
Float32 m31 | |
要素 ( 3, 1 ) の値 More... | |
Float32 m32 | |
要素 ( 3, 2 ) の値 More... | |
Float32 m33 | |
要素 ( 3, 3 ) の値 More... | |
} | |
Float32 m [4][4] | |
行列の要素 More... | |
}; | |
Friends | |
const Vector3 | operator* (const Vector3 &v, const Matrix4x4 &m) |
ベクトルを変換します More... | |
4x4行列クラス
Mix::Matrix4x4::Matrix4x4 | ( | void | ) |
コンストラクタ
Mix::Matrix4x4::Matrix4x4 | ( | const Mix::Quaternion & | r | ) |
コンストラクタ
[in] | r | 回転を表す Mix::Quaternion クラス |
Mix::Matrix4x4::Matrix4x4 | ( | const Mix::Quaternion & | r, |
const Mix::Vector3 & | t | ||
) |
コンストラクタ
[in] | r | 回転を表す Mix::Quaternion クラス |
[in] | t | 位置を表す Mix::Vector3 クラス |
Mix::Matrix4x4::Matrix4x4 | ( | const Mix::Vector3 & | s, |
const Mix::Quaternion & | r, | ||
const Mix::Vector3 & | t | ||
) |
コンストラクタ
[in] | s | スケールを表す Mix::Vector3 クラス |
[in] | r | 回転を表す Mix::Quaternion クラス |
[in] | t | 位置を表す Mix::Vector3 クラス |
Mix::Matrix4x4::Matrix4x4 | ( | Float32 | _m00, |
Float32 | _m01, | ||
Float32 | _m02, | ||
Float32 | _m03, | ||
Float32 | _m10, | ||
Float32 | _m11, | ||
Float32 | _m12, | ||
Float32 | _m13, | ||
Float32 | _m20, | ||
Float32 | _m21, | ||
Float32 | _m22, | ||
Float32 | _m23, | ||
Float32 | _m30, | ||
Float32 | _m31, | ||
Float32 | _m32, | ||
Float32 | _m33 | ||
) |
コンストラクタ
[in] | _m00 | m[0][0] の値 |
[in] | _m01 | m[0][1] の値 |
[in] | _m02 | m[0][2] の値 |
[in] | _m03 | m[0][3] の値 |
[in] | _m10 | m[1][0] の値 |
[in] | _m11 | m[1][1] の値 |
[in] | _m12 | m[1][2] の値 |
[in] | _m13 | m[1][3] の値 |
[in] | _m20 | m[2][0] の値 |
[in] | _m21 | m[2][1] の値 |
[in] | _m22 | m[2][2] の値 |
[in] | _m23 | m[2][3] の値 |
[in] | _m30 | m[3][0] の値 |
[in] | _m31 | m[3][1] の値 |
[in] | _m32 | m[3][2] の値 |
[in] | _m33 | m[3][3] の値 |
Mix::Matrix4x4::Matrix4x4 | ( | const Matrix4x4 & | mm | ) |
コピーコンストラクタ
[in] | mm | 行列 |
Mix::Vector3 Mix::Matrix4x4::GetScaling | ( | void | ) | const |
スケールを取得します
void Mix::Matrix4x4::SetScaling | ( | Float32 | s | ) |
スケールを設定します
[in] | s | スケール値 |
スケールを設定します
[in] | sx | X方向のスケール値 |
[in] | sy | Y方向のスケール値 |
[in] | sz | Z方向のスケール値 |
void Mix::Matrix4x4::SetScaling | ( | const Vector3 & | s | ) |
スケールを設定します
[in] | s | スケール |
Mix::Quaternion Mix::Matrix4x4::GetRotation | ( | void | ) | const |
回転を取得します
void Mix::Matrix4x4::SetRotation | ( | const Mix::Quaternion & | rot | ) |
回転を設定します
[in] | rot | 回転を表す Mix::Quaternion クラス |
void Mix::Matrix4x4::SetRotationX | ( | Float32 | r | ) |
X軸回転を設定します
[in] | r | 回転角( ラジアン単位 ) |
void Mix::Matrix4x4::SetRotationY | ( | Float32 | r | ) |
Y軸回転を設定します
[in] | r | 回転角( ラジアン単位 ) |
void Mix::Matrix4x4::SetRotationZ | ( | Float32 | r | ) |
Z軸回転を設定します
[in] | r | 回転角( ラジアン単位 ) |
Mix::Vector3 Mix::Matrix4x4::GetTranslation | ( | void | ) | const |
平行移動を取得します
平行移動を設定します
[in] | tx | X方向の移動量 |
[in] | ty | Y方向の移動量 |
[in] | tz | Z方向の移動量 |
void Mix::Matrix4x4::SetTranslation | ( | const Vector3 & | t | ) |
平行移動を設定します
[in] | t | 移動量 |
Mix::Vector4 Mix::Matrix4x4::GetColumn | ( | UInt32 | index | ) | const |
void Mix::Matrix4x4::SetColumn | ( | UInt32 | index, |
const Mix::Vector4 & | v | ||
) |
指定した列にベクトルを設定します
[in] | index | 列のインデックス( 0〜3 ) |
[in] | v | 設定するベクトルを表す Mix::Vector4 クラス |
Mix::Vector4 Mix::Matrix4x4::GetRow | ( | UInt32 | index | ) | const |
void Mix::Matrix4x4::SetRow | ( | UInt32 | index, |
const Mix::Vector4 & | v | ||
) |
指定した行にベクトルを設定します
[in] | index | 行のインデックス( 0〜3 ) |
[in] | v | 設定するベクトルを表す Mix::Vector4 クラス |
void Mix::Matrix4x4::Inverse | ( | void | ) |
自身を逆行列にします
Mix::Matrix4x4 Mix::Matrix4x4::ToInverse | ( | void | ) | const |
自身の逆行列を返します
void Mix::Matrix4x4::Transpose | ( | void | ) |
自身を転置行列にします
Mix::Matrix4x4 Mix::Matrix4x4::ToTranspose | ( | void | ) | const |
自身の転置行列を返します
Mix::Vector3 Mix::Matrix4x4::ToEulerXYZ | ( | void | ) | const |
オイラー角(XYZ)に変換します
Mix::Vector3 Mix::Matrix4x4::ToEulerXZY | ( | void | ) | const |
オイラー角(XZY)に変換します
Mix::Vector3 Mix::Matrix4x4::ToEulerYXZ | ( | void | ) | const |
オイラー角(YXZ)に変換します
Mix::Vector3 Mix::Matrix4x4::ToEulerYZX | ( | void | ) | const |
オイラー角(YZX)に変換します
Mix::Vector3 Mix::Matrix4x4::ToEulerZXY | ( | void | ) | const |
オイラー角(ZXY)に変換します
Mix::Vector3 Mix::Matrix4x4::ToEulerZYX | ( | void | ) | const |
オイラー角(ZYX)に変換します
void Mix::Matrix4x4::Transform | ( | Mix::Vector3 * | vectors, |
UInt32 | numVector | ||
) | const |
複数のベクトルをまとめて変換します
[in,out] | vectors | 変換するベクトルを表す Mix::Vector3 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
void Mix::Matrix4x4::Transform | ( | const Mix::Vector3 * | srcVectors, |
Mix::Vector3 * | dstVectors, | ||
UInt32 | numVector | ||
) | const |
複数のベクトルをまとめて変換します
[in] | srcVectors | 変換するベクトルを表す Mix::Vector3 クラスの配列 |
[in] | dstVectors | 変換したベクトルを代入する Mix::Vector3 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
void Mix::Matrix4x4::Transform | ( | Mix::Vector4 * | vectors, |
UInt32 | numVector | ||
) | const |
複数のベクトルをまとめて変換します
[in,out] | vectors | 変換するベクトルを表す Mix::Vector4 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
void Mix::Matrix4x4::Transform | ( | const Mix::Vector4 * | srcVectors, |
Mix::Vector4 * | dstVectors, | ||
UInt32 | numVector | ||
) | const |
複数のベクトルをまとめて変換します
[in] | srcVectors | 変換するベクトルを表す Mix::Vector4 クラスの配列 |
[in] | dstVectors | 変換したベクトルを代入する Mix::Vector4 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
Mix::Vector3 Mix::Matrix4x4::TransformSR | ( | const Mix::Vector3 & | v | ) | const |
ベクトルを変換します( 移動は行いません )
[in] | v | 変換するベクトルを表す Mix::Vector3 クラス |
void Mix::Matrix4x4::TransformSR | ( | Mix::Vector3 * | vectors, |
UInt32 | numVector | ||
) | const |
複数ベクトルをまとめて変換します( 移動は行いません )
[in,out] | vectors | 変換するベクトルを表す Mix::Vector3 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
void Mix::Matrix4x4::TransformSR | ( | const Mix::Vector3 * | srcVectors, |
Mix::Vector3 * | dstVectors, | ||
UInt32 | numVector | ||
) | const |
複数のベクトルをまとめて変換します( 移動は行いません )
[in] | srcVectors | 変換するベクトルを表す Mix::Vector3 クラスの配列 |
[in] | dstVectors | 変換したベクトルを代入する Mix::Vector3 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
Mix::Vector4 Mix::Matrix4x4::TransformSR | ( | const Mix::Vector4 & | v | ) | const |
ベクトルを変換します( 移動は行いません )
[in] | v | 変換するベクトルを表す Mix::Vector4 クラス |
void Mix::Matrix4x4::TransformSR | ( | Mix::Vector4 * | vectors, |
UInt32 | numVector | ||
) | const |
複数ベクトルをまとめて変換します( 移動は行いません )
[in,out] | vectors | 変換するベクトルを表す Mix::Vector4 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
void Mix::Matrix4x4::TransformSR | ( | const Mix::Vector4 * | srcVectors, |
Mix::Vector4 * | dstVectors, | ||
UInt32 | numVector | ||
) | const |
複数のベクトルをまとめて変換します( 移動は行いません )
[in] | srcVectors | 変換するベクトルを表す Mix::Vector4 クラスの配列 |
[in] | dstVectors | 変換したベクトルを代入する Mix::Vector4 クラスの配列 |
[in] | numVector | 変換するベクトルの数 |
void Mix::Matrix4x4::Compose | ( | const Mix::Vector3 & | s, |
const Mix::Quaternion & | r, | ||
const Mix::Vector3 & | t | ||
) |
スケーリング、ローテーション、トランスレーションを指定して行列を構成します
[out] | s | スケーリング表す Mix::Vector3 クラス |
[out] | r | ローテーション表す Mix::Quaternion クラス |
[out] | t | トランスレーション表す Mix::Vector3 クラス |
Boolean Mix::Matrix4x4::Decompose | ( | Mix::Vector3 & | s, |
Mix::Quaternion & | r, | ||
Mix::Vector3 & | t | ||
) | const |
スケーリング、ローテーション、トランスレーションに分解します
[out] | s | スケーリング表す Mix::Vector3 クラス |
[out] | r | ローテーション表す Mix::Quaternion クラス |
[out] | t | トランスレーション表す Mix::Vector3 クラス |
Mix::Matrix4x4 Mix::Matrix4x4::Remake | ( | Boolean | bScaling, |
Boolean | bRotation, | ||
Boolean | bTranslation | ||
) | const |
指定した成分で行列を再構成します
[in] | bScaling | スケーリングを含む場合は True |
[in] | bRotation | ローテーションを含む場合は True |
[in] | bTranslation | トランスレーションを含む場合は True |
等価比較
[in] | mat | 比較する行列 |
等価比較
[in] | mat | 比較する行列 |
行列を代入します
[in] | m | 代入元行列 |
行列同士を乗算します
[in] | m | 乗算元行列 |
行列同士を乗算します
[in] | m | 乗算元 |
ベクトルを変換します
[in] | v | 変換元ベクトル |
ベクトルを変換します
[in] | v | 変換元ベクトル |
|
static |
左手座標系のビュー行列を作成します
[in] | eye | 視点を表す Mix::Vector3 クラス |
[in] | at | 注視点を表す Mix::Vector3 クラス |
[in] | up | 上方を表す Mix::Vector3 クラス |
[out] | mat | 作成されたビュー行列を表す Mix::Matrix4x4 クラス |
|
static |
左手座標系のビュー行列を作成します
[in] | rot | 回転を表す Mix::Quaternion クラス |
[in] | at | 注視点を表す Mix::Vector3 クラス |
[in] | dist | 注視点から視点までの距離 |
[out] | mat | 作成されたビュー行列を表す Mix::Matrix4x4 クラス |
|
static |
左手座標系の射影行列を作成します
[in] | fovY | Y方向への視野角( ラジアン単位 ) |
[in] | aspect | アスペクト比( ビューの高さを幅で除算した値 ) |
[in] | nearZ | 最小Z値 |
[in] | farZ | 最大Z値 |
[out] | mat | 作成された射影行列を表す Mix::Matrix4x4 クラス |
|
static |
左手座標系の正射影行列を作成します
[in] | width | 幅 |
[in] | height | 高さ |
[in] | nearZ | 最小Z値 |
[in] | farZ | 最大Z値 |
[out] | mat | 作成された正射影行列を表す Mix::Matrix4x4 クラス |
|
static |
左手座標系の正射影行列を作成します
[in] | min | 最小値を表す Mix::Vector3 クラス |
[in] | max | 最大値を表す Mix::Vector3 クラス |
[out] | mat | 作成された正射影行列を表す Mix::Matrix4x4 クラス |
|
inlinestatic |
全ての要素が 0.0f の行列を取得します
|
inlinestatic |
単位行列を取得します
ベクトルを変換します
[in] | v | 変換元ベクトル |
[in] | m | 変換行列 |
Float32 Mix::Matrix4x4::m00 |
要素 ( 0, 0 ) の値
Float32 Mix::Matrix4x4::m01 |
要素 ( 0, 1 ) の値
Float32 Mix::Matrix4x4::m02 |
要素 ( 0, 2 ) の値
Float32 Mix::Matrix4x4::m03 |
要素 ( 0, 3 ) の値
Float32 Mix::Matrix4x4::m10 |
要素 ( 1, 0 ) の値
Float32 Mix::Matrix4x4::m11 |
要素 ( 1, 1 ) の値
Float32 Mix::Matrix4x4::m12 |
要素 ( 1, 2 ) の値
Float32 Mix::Matrix4x4::m13 |
要素 ( 1, 3 ) の値
Float32 Mix::Matrix4x4::m20 |
要素 ( 2, 0 ) の値
Float32 Mix::Matrix4x4::m21 |
要素 ( 2, 1 ) の値
Float32 Mix::Matrix4x4::m22 |
要素 ( 2, 2 ) の値
Float32 Mix::Matrix4x4::m23 |
要素 ( 2, 3 ) の値
Float32 Mix::Matrix4x4::m30 |
要素 ( 3, 0 ) の値
Float32 Mix::Matrix4x4::m31 |
要素 ( 3, 1 ) の値
Float32 Mix::Matrix4x4::m32 |
要素 ( 3, 2 ) の値
Float32 Mix::Matrix4x4::m33 |
要素 ( 3, 3 ) の値
Float32 Mix::Matrix4x4::m[4][4] |
行列の要素
union { ... } |