MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
MGTransf クラス

MGTransf represents a transformation of a space dimension. [詳解]

公開メンバ関数

 MGTransf (int dim=0)
 
 MGTransf (const MGMatrix &, const MGVector &)
 
 MGTransf (double scale, const MGVector &)
 
 MGTransf (int sdim, const MGTransf &transf, int start1=0, int start2=0)
 
 MGTransf (double scalex, double scaley)
 
 MGTransf (const MGUnit_vector &unit, const MGPosition &origin)
 
 MGTransf (double scalex, double scaley, double scalez)
 
 MGTransf (const MGUnit_vector &uvecx, const MGUnit_vector &uvecy, const MGPosition &P)
 
 MGTransf (const MGPosition &P0, const MGPosition &P1, const MGPosition &Q0, const MGPosition &Q1)
 
double operator() (int i, int j) const
 Reference (i,j)-th element. [詳解]
 
double & operator() (int i, int j)
 Access to (i,j)-th element. [詳解]
 
MGObjectoperator() (MGObject &object)
 
MGObjectoperator() (MGObject *object)
 
MGTransf operator+ (const MGVector &) const
 
MGTransfoperator+= (const MGVector &)
 
MGTransf operator- (const MGVector &) const
 
MGTransfoperator-= (const MGVector &)
 
MGTransf operator* (double scale) const
 
MGTransf operator* (const MGMatrix &) const
 
MGTransf operator* (const MGTransf &) const
 
MGTransfoperator*= (double scale)
 
MGTransfoperator*= (const MGMatrix &)
 
MGTransfoperator*= (const MGTransf &)
 
bool operator== (const MGTransf &) const
 
bool operator!= (const MGTransf &) const
 
const MGMatrixaffine () const
 
void convert_to_glMatrix (glm::mat4 &glMatI) const
 Convert this transf matrix to OpenGL Matrix. [詳解]
 
bool is_null () const
 Test if this is null. [詳解]
 
int out_to_IGES (MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
 
double ref (int i, int j) const
 Reference (i,j)-th element. [詳解]
 
void resize (int sdim)
 Change the space dimension of this MGTransf to the new sdim. [詳解]
 
double scale () const
 Obtain the scaling factor of this transf. [詳解]
 
int sdim () const
 Return space dimension. [詳解]
 
MGTransfset_matrix (const MGMatrix &mat, const MGPosition &point)
 
void set_null ()
 Set this as a null transf. [詳解]
 
MGTransfset_reflect_2D (const MGVector &vec, const MGPosition &P=mgORIGIN_2D)
 
MGTransfset_rotate_2D (double angle, const MGPosition &P=mgORIGIN_2D)
 
MGTransfset_reflect_3D (const MGVector &, const MGPosition &P=mgORIGIN)
 
MGTransfset_rotate_3D (const MGVector &vec, double angle, const MGPosition &P=mgORIGIN)
 
MGTransfset_scale (double scale)
 
MGTransfset_diff_scale (double *scale)
 
MGTransfset_glMatrix (const double glMat[16])
 Set up this transf from OpenGL matrix. [詳解]
 
const MGVectortranslation () const
 
int dump_size () const
 Dump Functions. [詳解]
 
int dump (MGOfstream &) const
 Dump Function. [詳解]
 
int restore (MGIfstream &)
 Restore Function. [詳解]
 

フレンド

MG_DLL_DECLR friend MGTransf operator* (double scale, const MGTransf &)
 
MG_DLL_DECLR friend MGTransf operator* (const MGVector &v, const MGTransf &tr)
 
MG_DLL_DECLR friend std::ostream & operator<< (std::ostream &, const MGTransf &)
 String stream function. [詳解]
 

詳解

MGTransf represents a transformation of a space dimension.

While MGMatrix is for the transformation about the origin(0,0,0), MGTransf is a general transformation. Transformation consists of a matrix and a vector. The matrix defines an affine transformation and the vector defines a translation. Let T be a MGTransf and A be an object. Then MGTransf transformation of the object A is defined as: A*T. (Not T*A)

構築子と解体子

MGTransf::MGTransf ( int  dim = 0)
explicit

General Space dimension Constructor. When dim>=1, MGMatrix is initialized as a unit matrix.

MGTransf::MGTransf ( const MGMatrix ,
const MGVector  
)

全てのコンポーネントを指定してTransfを生成。 Construct Transf from a matrix and a vector. ***** This is the fundamental constructor.*****

MGTransf::MGTransf ( double  scale,
const MGVector  
)

各軸方向で等しい Scaling のTransf生成。 Transf from same scaling factor for all coordinates and a translation.

MGTransf::MGTransf ( int  sdim,
const MGTransf transf,
int  start1 = 0,
int  start2 = 0 
)

Construct Transf by copying old Transf, changing space dimension, and ordering of coordinates.

MGTransf::MGTransf ( double  scalex,
double  scaley 
)

各軸方向(x,y)で異なる Scaling の2D Transfを生成。 2D Transf from different scaling factors for x and y coordinates. No translation.

MGTransf::MGTransf ( const MGUnit_vector unit,
const MGPosition origin 
)

Construct 2D space Transf to transform data for 'origin' to be origin(0,0,0) and for 'unit' to be x-coordimate.

引数
unitunit vector to be x-coordinate.
originorigin to be origin.
MGTransf::MGTransf ( double  scalex,
double  scaley,
double  scalez 
)

各軸方向( x,y,z )で異なる Scaling の3D Transfを生成。 3D Transf from different scaling factors for x, y and z coordinates. No translation.

MGTransf::MGTransf ( const MGUnit_vector uvecx,
const MGUnit_vector uvecy,
const MGPosition P 
)

与えられた点を原点にするように平行移動し、与えられた2つの単位vector を各々、X軸、Y軸にするよう回転させる 3D Transfを生成する。もし、 2つ目の単位vectorが1つ目の単位vectorと直交しない場合は、2つの ベクトルのかわりに両vectorを含む平面内で直交するよう変換したvectorを 使用する。 3D Transf to transform P to be origin(0,0,0), uvecx to be x-axis and uvecy to be y-axis. If uvecx and uvecy does not cross at right angle, uvecy will be transformed.

引数
uvecx1st unit vector.
uvecy2nd unit vector
Porigin
MGTransf::MGTransf ( const MGPosition P0,
const MGPosition P1,
const MGPosition Q0,
const MGPosition Q1 
)

Transf to transform the line segment (P0, P1) to the line segment(Q0, Q1) P0 is transformed to Q0 and P1 is transformed to Q1. Space dimension of each points can be any number more than 1.

関数詳解

const MGMatrix& MGTransf::affine ( ) const
inline

Transfのアフィン部分を返却する。 Return affine matrix of the transformation.

void MGTransf::convert_to_glMatrix ( glm::mat4 &  glMatI) const

Convert this transf matrix to OpenGL Matrix.

int MGTransf::dump ( MGOfstream ) const

Dump Function.

int MGTransf::dump_size ( ) const

Dump Functions.

bool MGTransf::is_null ( ) const
inline

Test if this is null.

bool MGTransf::operator!= ( const MGTransf ) const
double MGTransf::operator() ( int  i,
int  j 
) const
inline

Reference (i,j)-th element.

double& MGTransf::operator() ( int  i,
int  j 
)

Access to (i,j)-th element.

MGObject& MGTransf::operator() ( MGObject object)

Functor to apply this transform to the object Function's return is the reference to object.

MGObject* MGTransf::operator() ( MGObject object)
MGTransf MGTransf::operator* ( double  scale) const

自身のTransfとscaleの乗算を行いオブジェクトを生成する。 Scaling of the transf.

MGTransf MGTransf::operator* ( const MGMatrix ) const

自身のTransfとMatrixの乗算を行いオブジェクトを生成する。 Multiplication of transf and matrix.

MGTransf MGTransf::operator* ( const MGTransf ) const

自身のTransfと与えられたTransfの乗算を行いオブジェクトを生成する。 Multiplication of two transfs.

MGTransf& MGTransf::operator*= ( double  scale)

自身のTransfとscaleの乗算を行い自身のTransfとする。 Scaling of the transf.

MGTransf& MGTransf::operator*= ( const MGMatrix )

自身のTransfとMatrixの乗算を行い自身のTransfとする。 Multiplication of transf and matrix.

MGTransf& MGTransf::operator*= ( const MGTransf )

自身のTransfと与えられたTransfの乗算を行い自身のTransfとする。 Multiplication of two transfs.

MGTransf MGTransf::operator+ ( const MGVector ) const

自身のTransfとvectorの加算を行いオブジェクトを生成する。 Translation of Transf.

MGTransf& MGTransf::operator+= ( const MGVector )

自身のTransfとvectorの加算を行い自身のTransfとする。 Translation of Transf.

MGTransf MGTransf::operator- ( const MGVector ) const

自身のTransfとvectorの減算を行いオブジェクトを生成する。 Translation of Transf.

MGTransf& MGTransf::operator-= ( const MGVector )

自身のTransfとvectorの減算を行い自身のTransfとする。 Translation of Transf.

bool MGTransf::operator== ( const MGTransf ) const

Boolean operation. 自身のTransfと与えられたTransfが等しいかどうか比較を行う。 Equal comparison of two transf.

int MGTransf::out_to_IGES ( MGIgesOfstream igesfile,
int  SubordinateEntitySwitch = 0 
) const

PD124=Transformation matrix. Function's return value is the directory entry id created.

double MGTransf::ref ( int  i,
int  j 
) const

Reference (i,j)-th element.

void MGTransf::resize ( int  sdim)

Change the space dimension of this MGTransf to the new sdim.

int MGTransf::restore ( MGIfstream )

Restore Function.

double MGTransf::scale ( ) const
inline

Obtain the scaling factor of this transf.

int MGTransf::sdim ( ) const
inline

Return space dimension.

MGTransf& MGTransf::set_diff_scale ( double *  scale)

与えられた拡大、縮小のTransfを既存のTransfと 入れ換える。 Scales are input through scale[sdim()]. Update to scaling trans of different scaling values for each coordinate. Not change space dimension. No translation.

MGTransf& MGTransf::set_glMatrix ( const double  glMat[16])

Set up this transf from OpenGL matrix.

MGTransf& MGTransf::set_matrix ( const MGMatrix mat,
const MGPosition point 
)

Construct a transf to do the transformation of matrix around input point instead of origin of matrix, and replace own transf with it.

void MGTransf::set_null ( )

Set this as a null transf.

MGTransf& MGTransf::set_reflect_2D ( const MGVector vec,
const MGPosition P = mgORIGIN_2D 
)

指定点を通り、与えられたベクトルに関して鏡面変換する 2D Transf を生成し既存のTransfと入れ換える。指定点 に何も指定されない場合、原点を使用する。 2D mirror reflection transf about a line whose direction is vec and passes through point P.

MGTransf& MGTransf::set_reflect_3D ( const MGVector ,
const MGPosition P = mgORIGIN 
)

指定点を通り、与えられたvectorに垂直な平面に関して鏡面変換する 3DのTransfを生成し既存のTransfと入れ換える。指定点省略時は原点 とする。 3D mirror reflection transf about a plane whose normal is vec and passes through point P.

MGTransf& MGTransf::set_rotate_2D ( double  angle,
const MGPosition P = mgORIGIN_2D 
)

指定点を中心に反時計回りに指定角度回転する 2D Transfを生成し既存のTransfと入れ換える。指定点 に何も指定されない場合、原点を使用する。 Rotation 2D matrix around point P by angle.

MGTransf& MGTransf::set_rotate_3D ( const MGVector vec,
double  angle,
const MGPosition P = mgORIGIN 
)

指定点を通り指定方向vectorを持つ直線の回りに指定角度回転する Transfを生成し既存のTransfと入れ換える。指定点 に何も指定されない場合、原点を使用する。 3D rotation matrix around the straight line whose direction is vec and that passes through point P.

MGTransf& MGTransf::set_scale ( double  scale)

与えられた拡大、縮小のTransfを既存のTransfと 入れ換える。 Update to scaling transf of same scaling value for each coordinate. Not change space dimension. No translation.

const MGVector& MGTransf::translation ( ) const
inline

Transfの平行移動部分を返却する。 Return translation part of the transf.

フレンドと関連関数の詳解

MG_DLL_DECLR friend MGTransf operator* ( double  scale,
const MGTransf  
)
friend

自身のTransfとscaleの乗算を行いオブジェクトを生成する。 Scaling of the transf.

MG_DLL_DECLR friend MGTransf operator* ( const MGVector v,
const MGTransf tr 
)
friend

ベクトルとトランスフォームの乗算を行いTransfを生成 Genarate a Transf by multiplication of a vector and transf.

MG_DLL_DECLR friend std::ostream& operator<< ( std::ostream &  ,
const MGTransf  
)
friend

String stream function.


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