KisaragiLibrary
 
読み取り中…
検索中…
一致する文字列を見つけられません
Kisaragi_Lib::Transform2D::Position2D クラス

matrixのポジションを扱うラッパークラス [詳解]

#include <Transform.hpp>

クラス

class  PosX
 
class  PosY
 

公開メンバ関数

 Position2D (Matrix2D *_p)
 
 operator Point2D< double > () const
 
Point2D< double > operator+ (Point2D< double > _p)
 
Point2D< double > operator+= (Point2D< double > _p)
 
Point2D< double > operator- (Point2D< double > _p)
 
Point2D< double > operator-= (Point2D< double > _p)
 
Point2D< double > operator= (Point2D< double > _p)
 
 operator Point2D< double > ()
 

公開変数類

PosX x { pMat }
 
PosY y { pMat }
 

非公開変数類

Matrix2DpMat
 

詳解

matrixのポジションを扱うラッパークラス

構築子と解体子

◆ Position2D()

Kisaragi_Lib::Transform2D::Position2D::Position2D ( Matrix2D * _p)
inline
58:pMat(_p){}
Matrix2D * pMat
Definition Transform.hpp:28

関数詳解

◆ operator Point2D< double >() [1/2]

Kisaragi_Lib::Transform2D::Position2D::operator Point2D< double > ( ) const
inline
61 {
62 return pMat->Position();
63 }

◆ operator+()

Point2D< double > Kisaragi_Lib::Transform2D::Position2D::operator+ ( Point2D< double > _p)
inline
66 {
67 return pMat->Position() + _p;
68 }

◆ operator+=()

Point2D< double > Kisaragi_Lib::Transform2D::Position2D::operator+= ( Point2D< double > _p)
inline
71 {
72 //回転の影響を受けた移動をする.
73 //*pMat *= Matrix2D::CreateMoveMatrix(_p.x, _p.y);
74
75 //軸に平行な移動をする.
76 pMat->AxisAlignedTranslation(_p.x, _p.y);
77
78 return *this; //operator呼び出し-
79 }

◆ operator-()

Point2D< double > Kisaragi_Lib::Transform2D::Position2D::operator- ( Point2D< double > _p)
inline
82 {
83 return pMat->Position() - _p;
84 }

◆ operator-=()

Point2D< double > Kisaragi_Lib::Transform2D::Position2D::operator-= ( Point2D< double > _p)
inline
87 {
88 //回転の影響を受けた移動をする.
89 //*pMat *= Matrix2D::CreateMoveMatrix(_p.x, _p.y);
90
91 //軸に平行な移動をする.
92 pMat->AxisAlignedTranslation(-_p.x, -_p.y);
93
94 return *this; //operator呼び出し
95 }

◆ operator=()

Point2D< double > Kisaragi_Lib::Transform2D::Position2D::operator= ( Point2D< double > _p)
inline
98 {
99
100 pMat->SetAxisAlignedTranslation(_p.x, _p.y);
101 return *this; //operator呼び出し
102 }

◆ operator Point2D< double >() [2/2]

Kisaragi_Lib::Transform2D::Position2D::operator Point2D< double > ( )
inline
105 {
106 return Point2D<double>(x,y);
107 }
PosX x
Definition Transform.hpp:109
PosY y
Definition Transform.hpp:110

メンバ詳解

◆ pMat

Matrix2D* Kisaragi_Lib::Transform2D::Position2D::pMat
private

◆ x

PosX Kisaragi_Lib::Transform2D::Position2D::x { pMat }
109{ pMat };

参照元 operator Point2D< double >().

◆ y

PosY Kisaragi_Lib::Transform2D::Position2D::y { pMat }
110{ pMat };

参照元 operator Point2D< double >().


このクラス詳解は次のファイルから抽出されました: