TAffine行列(回転,拡大,平行移動を表す)行列.
[詳細]
#include <Affine.h>
|
typedef PTM::TMatrixDescCol
< TAffine< T >
, PTM::TMatrixRow< 4, 4, T >
, 4, 4, 4, T > | desc |
| |
typedef PTM::TMatrixBase
< 4, 4, desc > | base_type |
| |
|
| | DEF_MATRIX_BASIC_MEMBER (TAffine) |
| | 継承されない基本的なメンバの定義. [詳細]
|
| |
|
element_type & | item_impl (size_t i, size_t j) |
| | 要素のアクセス
|
| |
|
const element_type & | item_impl (size_t i, size_t j) const |
| |
|
PTM::TSubMatrixCol< 3, 3, desc > & | Rot () |
| | 回転拡大変換部への参照を返す.
|
| |
const PTM::TSubMatrixCol
< 3, 3, desc > & | Rot () const |
| | 回転拡大変換部への参照を返す (const版).
|
| |
|
|
TVec3< element_type > & | Ex () |
| |
|
const TVec3< element_type > & | Ex () const |
| |
|
TVec3< element_type > & | Ey () |
| |
|
const TVec3< element_type > & | Ey () const |
| |
|
TVec3< element_type > & | Ez () |
| |
|
const TVec3< element_type > & | Ez () const |
| |
|
TVec3< element_type > & | Trn () |
| |
|
const TVec3< element_type > & | Trn () const |
| |
|
TVec3< element_type > & | Pos () |
| | 平行移動成分(Trn()の別名)
|
| |
|
const TVec3< element_type > & | Pos () const |
| | 平行移動成分(Trn()の別名,const 版)
|
| |
|
|
element_type & | ExX () |
| |
|
const element_type & | ExX () const |
| |
|
element_type & | ExY () |
| |
|
const element_type & | ExY () const |
| |
|
element_type & | ExZ () |
| |
|
const element_type & | ExZ () const |
| |
|
element_type & | EyX () |
| |
|
const element_type & | EyX () const |
| |
|
element_type & | EyY () |
| |
|
const element_type & | EyY () const |
| |
|
element_type & | EyZ () |
| |
|
const element_type & | EyZ () const |
| |
|
element_type & | EzX () |
| |
|
const element_type & | EzX () const |
| |
|
element_type & | EzY () |
| |
|
const element_type & | EzY () const |
| |
|
element_type & | EzZ () |
| |
|
const element_type & | EzZ () const |
| |
|
element_type & | TrnX () |
| |
|
const element_type & | TrnX () const |
| |
|
element_type & | TrnY () |
| |
|
const element_type & | TrnY () const |
| |
|
element_type & | TrnZ () |
| |
|
const element_type & | TrnZ () const |
| |
|
element_type & | PosX () |
| | TrnX()の別名
|
| |
|
const element_type & | PosX () const |
| |
|
element_type & | PosY () |
| | TrnY()の別名
|
| |
|
const element_type & | PosY () const |
| |
|
element_type & | PosZ () |
| | TrnZ()の別名
|
| |
|
const element_type & | PosZ () const |
| |
|
element_type & | ExW () |
| |
|
const element_type & | ExW () const |
| |
|
element_type & | EyW () |
| |
|
const element_type & | EyW () const |
| |
|
element_type & | EzW () |
| |
|
const element_type & | EzW () const |
| |
|
element_type & | TrnW () |
| |
|
const element_type & | TrnW () const |
| |
|
element_type & | PosW () |
| |
|
const element_type & | PosW () const |
| |
|
|
union { |
|
struct { |
| T xx |
| |
| T xy |
| |
| T xz |
| |
| T xw |
| |
| T yx |
| |
| T yy |
| |
| T yz |
| |
| T yw |
| |
| T zx |
| |
| T zy |
| |
| T zz |
| |
| T zw |
| |
| T px |
| |
| T py |
| |
| T pz |
| |
| T pw |
| |
| } | |
| |
| T data [4][4] |
| |
| }; | |
| |
|
| template<class BUF > |
| void | LookAt (const PTM::TVectorBase< 3, BUF > &targetPos, const TVec3< typename BUF::element_type > &upDir=TVec3< typename BUF::element_type >(0, 1, 0)) |
| | 注視行列として初期化 [詳細]
|
| |
| template<class BUF > |
| void | LookAtGL (const PTM::TVectorBase< 3, BUF > &targetPos, const TVec3< typename BUF::element_type > &upDir=TVec3< typename BUF::element_type >(0, 1, 0)) |
| | 注視行列として初期化 [詳細]
|
| |
|
void | Orthonormalization () |
| | 正規直交化
|
| |
|
void | set_default () |
| | コンストラクタ
|
| |
|
static TAffine< T > | Unit () |
| | 単位行列
|
| |
|
static TAffine< T > | Trn (element_type px, element_type py, element_type pz) |
| | 平行移動
|
| |
|
static TAffine< T > | Rot (element_type th, char axis) |
| | x/y/z軸まわり回転
|
| |
| template<class BUF > |
| static TAffine< T > | Rot (element_type th, const PTM::TVectorBase< 3, BUF > &axis) |
| | 任意軸まわり回転 [詳細]
|
| |
|
static TAffine< T > | Scale (element_type sx, element_type sy, element_type sz) |
| | 拡大
|
| |
| template<class BUFS , class BUFZ > |
| static TAffine< T > | ProjectionGL (const PTM::TVectorBase< 3, BUFS > &screen, const PTM::TVectorBase< 2, BUFZ > &size, element_type front=1.0f, element_type back=10000.0f) |
| | OpenGLの射影行列として初期化 [詳細]
|
| |
| template<class BUFS , class BUFZ > |
| static TAffine< T > | ProjectionD3D (const PTM::TVectorBase< 3, BUFS > &screen, const PTM::TVectorBase< 2, BUFZ > &size, element_type front=1.0f, element_type back=10000.0f) |
| | Direct3Dの射影行列として初期化 [詳細]
|
| |
| template<class BUFS , class BUFZ > |
| static TAffine< T > | OrthoGL (const PTM::TVectorBase< 3, BUFS > &screen, const PTM::TVectorBase< 2, BUFZ > &size, element_type front=1.0f, element_type back=10000.0f) |
| | OpenGLの直交射影変換 [詳細]
|
| |
template<class T>
class Spr::TAffine< T >
概要は,pgAffine 参照.
| DEF_MATRIX_BASIC_MEMBER |
( |
TAffine< T > |
| ) |
|
- 参照
- ::DEF_MATRIX_BASIC_MEMBER
| void LookAt |
( |
const PTM::TVectorBase< 3, BUF > & |
targetPos, |
|
|
const TVec3< typename BUF::element_type > & |
upDir = TVec3<typename BUF::element_type>(0,1,0) |
|
) |
| |
|
inline |
@param targetPos 注視点の位置
@param upDir y向きベクトル
Affine行列の位置はそのままに,Ez()がtargetPosへ向き,Ey()がupDirへ向くように傾きを設定する.
位置はTrn() (Pos())で予め設定する.
NOTE: 今までの実装ではupDirが位置ベクトルとして実装されていましたが,OpenGLの仕様に合わせるため 方向ベクトルとしました.既存のコードは影響を受ける可能性があります. tazz 09/05/29
| void LookAtGL |
( |
const PTM::TVectorBase< 3, BUF > & |
targetPos, |
|
|
const TVec3< typename BUF::element_type > & |
upDir = TVec3<typename BUF::element_type>(0,1,0) |
|
) |
| |
|
inline |
@param targetPos 注視点の位置
@param upDir y向きベクトル
Affine行列の位置はそのままに,-Ez()がtargetPosへ向き,Ey()がupDirへ向くように傾きを設定する.
位置はTrn() (Pos())で予め設定する.
NOTE: 上と同様の注意.
- 引数
-
| screen | カメラから見たビューポートの中心の位置 |
| size | ビューポートのサイズ |
| front | 手前のクリッピング平面とカメラの距離 |
| back | 奥のクリッピング平面とカメラの距離 |
- 引数
-
| screen | カメラから見たビューポートの中心の位置 |
| size | ビューポートのサイズ |
| front | 手前のクリッピング平面とカメラの距離 |
| back | 奥のクリッピング平面とカメラの距離 |
+ +
|u^2+(1-u^2)cos(th) uv(1-cos(th))-wsin(th) wu(1-cos(th))+vsin(th)|
R = |uv(1-cos(th))+wsin(th) v^2+(1-v^2)cos(th) vw(1-cos(th))-usin(th)|
|wu(1-cos(th))-vsin(th) vw(1-cos(th))+usin(th) w^2+(1-w^2)cos(th) |
+ +
このクラスの説明は次のファイルから生成されました: