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

Define a unit vector, is a MGVector. [詳解]

MGUnit_vector の継承関係図
MGVector

公開メンバ関数

 MGUnit_vector (int sdim=3)
 Void constructor. [詳解]
 
 MGUnit_vector (const MGVector &v)
 
MGUnit_vectoroperator= (const MGVector &vec2)
 Assignment From Vector. [詳解]
 
MGUnit_vectoroperator= (const double *)
 
MGUnit_vectoroperator+= (const MGVector &vec2)
 Update the unit vector by adding vec2. [詳解]
 
MGUnit_vector operator- () const
 
MGUnit_vectoroperator-= (const MGVector &vec2)
 
MGUnit_vectoroperator*= (const MGVector &vec2)
 Update own vector by vector product output. [詳解]
 
void orthonormal (const MGVector &sv, MGUnit_vector &v1, MGUnit_vector &v2) const
 
- 基底クラス MGVector に属する継承公開メンバ関数
 MGVector (int sdim=0)
 Void constructor. [詳解]
 
 MGVector (double x, double y)
 Construct 2D vector by providing each element data. [詳解]
 
 MGVector (double x, double y, double z)
 Construct 3D vector by providing each element data. [詳解]
 
 MGVector (double x, double y, double z, double w)
 Construct 4D vector by providing each element data. [詳解]
 
 MGVector (int sdim, double v)
 
 MGVector (int sdim, const double *v)
 
 MGVector (const MGPosition &)
 
 MGVector (const MGVector &dvec, const MGVector &svec)
 Construct a vector from a difference of two vectors. [詳解]
 
 MGVector (int sdim, const MGVector &vec2, int start1=0, int start2=0)
 
 MGVector (const std::vector< double > &darrays)
 Construct from std::vector<double> [詳解]
 
 MGVector (const MGVector &)
 Copy constructor. [詳解]
 
 ~MGVector ()
 
MGVectoroperator= (const MGVector &)
 Assignment. [詳解]
 
double operator() (int i) const
 Return i-th element of the vector. [詳解]
 
double operator[] (int i) const
 Return i-th element of the vector. [詳解]
 
double & operator() (int i)
 
MGVectoroperator= (const double *)
 Update vector data by array of double. [詳解]
 
MGVectoroperator+= (const MGVector &)
 
MGVector operator- () const
 
MGVectoroperator-= (const MGVector &)
 
MGVectoroperator*= (double scale)
 
MGVectoroperator*= (const MGVector &vec2)
 Update own vector by vector product output, changes to 3D vector. [詳解]
 
MGVectoroperator/= (double scale)
 
double angle (const MGVector &) const
 
double anglepai (const MGVector &v2) const
 
double angle2pai (const MGVector &v2, const MGVector &N) const
 
double cangle (const MGVector &) const
 
MGVectorclear (double init=0.0)
 Clear all the element by the value init. [詳解]
 
const double * data () const
 Return the 1st address of the array of the vector double data. [詳解]
 
double * data ()
 
MGVector interpolate (double t, const MGVector &vec2) const
 
MGVector interpolate_by_rotate (double t, const MGVector &vec2, double *ratio=0) const
 
bool is_collinear (const MGVector &v2) const
 
bool is_collinear (const MGVector &v2, const MGVector &v3) const
 
bool is_null () const
 Test if this is null. [詳解]
 
bool is_unit_vector () const
 
bool is_zero_vector () const
 Return true when the vector is a zero vector. [詳解]
 
double len () const
 
void negate ()
 Negate the vector. [詳解]
 
MGUnit_vector normalize () const
 
bool orthogonal (const MGVector &) const
 
int out_to_IGES (MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
 
MGVector orthogonize (const MGVector &vec2) const
 
bool parallel (const MGVector &) const
 
MGVector project (const MGVector &v2) const
 
double ref (int i) const
 Reference to i-th element. [詳解]
 
void resize (int new_sdim)
 
double sangle (const MGVector &) const
 
int sdim () const
 Get the space dimension. [詳解]
 
void set_null ()
 Set this as a null vector. [詳解]
 
void set_unit ()
 Change this to a unit vector. [詳解]
 
void store_at (int i, const MGVector &vec2, int j=0)
 
void store_at (int i, const MGVector &vec2, int j, int len)
 
void swap (int i, int j)
 
int dump_size () const
 
int dump (MGOfstream &) const
 Dump Function. [詳解]
 
int restore (MGIfstream &)
 Restore Function. [詳解]
 

フレンド

MG_DLL_DECLR friend std::ostream & operator<< (std::ostream &, const MGUnit_vector &)
 String stream function. [詳解]
 

その他の継承メンバ

- 基底クラス MGVector に属する継承限定公開メンバ関数
double & set (int i)
 When length not computed, negative value will be set. [詳解]
 
- 基底クラス MGVector に属する継承限定公開変数類
int m_sdim
 Friend Function. [詳解]
 
double * m_element
 
double m_data [3]
 
double m_length
 For vector data of space dimension less or equal to 3. [詳解]
 

詳解

Define a unit vector, is a MGVector.

構築子と解体子

MGUnit_vector::MGUnit_vector ( int  sdim = 3)

Void constructor.

引数
sdimspace dimension
MGUnit_vector::MGUnit_vector ( const MGVector v)

Unit vector from general vector. ベクトルを指定してその単位ベクトルを生成する.

関数詳解

MGUnit_vector& MGUnit_vector::operator*= ( const MGVector vec2)

Update own vector by vector product output.

MGUnit_vector& MGUnit_vector::operator+= ( const MGVector vec2)

Update the unit vector by adding vec2.

自身のベクトルに与えられたベクトルを加算して自身のベクトルとする.

MGUnit_vector MGUnit_vector::operator- ( ) const

Unary minus. Negate the vector. 単項マイナス。自身の単位ベクトルを反転したオブジェクトを生成

MGUnit_vector& MGUnit_vector::operator-= ( const MGVector vec2)

Update the unit vector by subtractiong vec2. The result is unit of the vector of two vector subtraction. 自身のベクトルから与えられたベクトルを減算し自身のベクトルとする

MGUnit_vector& MGUnit_vector::operator= ( const MGVector vec2)

Assignment From Vector.

MGUnit_vector& MGUnit_vector::operator= ( const double *  )

Update vector data by array of double. The result is unit of the updated vector.

void MGUnit_vector::orthonormal ( const MGVector sv,
MGUnit_vector v1,
MGUnit_vector v2 
) const

Compute orthonormal system, given sub(sv) vectors. (*this, v1, v2) organizes orthonormal system of 3D. If sv.orthogonal(*this), v1=sv.normalize().

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

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

String stream function.


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