MGCL V10
V10
MGCL V10
|
Represent a positional data. [詳解]
公開メンバ関数 | |
MGPosition (const MGPoint &point) | |
Conversion Constructor from a point. [詳解] | |
MGPosition (const MGVector &vec) | |
Conversion Constructor from a vector. [詳解] | |
MGPosition (int sdim=0) | |
Void constructor void コンストラクタ [詳解] | |
MGPosition (double x, double y) | |
Construct 2D position by providing x,y coordinate data. [詳解] | |
MGPosition (double x, double y, double z) | |
Construct 3D position by providing x,y,z coordinate data. [詳解] | |
MGPosition (double x, double y, double z, double w) | |
Construct 4D position by providing x,y,z,w coordinate data. [詳解] | |
MGPosition (int sdim, const double *v) | |
MGPosition (int sdim, const MGPosition &p, int start1=0, int start2=0) | |
MGPosition (const std::vector< double > &darrays) | |
Construct from std::vector<double> [詳解] | |
MGPosition & | operator= (const double *a) |
double | operator[] (int i) const |
Return i-th element of the position. [詳解] | |
double | operator() (int i) const |
double & | operator() (int i) |
Access to i-th element. [詳解] | |
MGPosition & | operator+= (const MGVector &vec) |
MGPosition & | operator+= (const MGPosition &pos) |
MGPosition | operator- () const |
MGPosition & | operator-= (const MGVector &vec) |
MGPosition & | operator*= (double scale) |
MGPosition & | operator*= (const MGMatrix &) |
MGPosition & | operator*= (const MGTransf &) |
MGPosition & | operator/= (double) |
double | angle (const MGPosition &start, const MGPosition &end, const MGVector &normal) const |
MGPosition & | clear (double init=0.0) |
Clear all the element by the value init. [詳解] | |
double | closest (const MGCurve &curve) const |
MGPosition | closest (const MGSurface &surf) const |
MGPosition * | clone () const |
const double * | data () const |
Return the 1st address of the array of the point double data. [詳解] | |
double * | data () |
double | distance (const MGPosition &P2) const |
Return the distance of this and P2. [詳解] | |
MGPosition | interpolate (double t2, const MGPosition &vec2) const |
bool | is_collinear (const MGPosition &P2, const MGPosition &P3) const |
bool | is_null () const |
Test if this is null. [詳解] | |
double | len () const |
bool | on (const MGCurve &curve, double &t) const |
bool | on (const MGSurface &surf, MGPosition &uv) const |
int | out_to_IGES (MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const |
double | param (const MGCurve &crv) const |
MGPosition | param (const MGSurface &srf) const |
MGCParam_list | perps (const MGCurve &crv) const |
MGPosition_list | perps (const MGSurface &srf) const |
MGVector | project (const MGVector &v2) const |
double | ref (int i) const |
void | resize (int new_sdim) |
int | sdim () const |
Get the space dimension. [詳解] | |
void | set_null () |
Set this as a null position. [詳解] | |
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) |
const MGVector & | vector () const |
int | dump_size () const |
Dump Functions. [詳解] | |
int | dump (MGOfstream &) const |
Dump Function. [詳解] | |
int | restore (MGIfstream &) |
Restore Function. [詳解] | |
フレンド | |
MGPosition | operator+ (const MGPosition &p1, const MGVector &vec) |
Translation of the position. [詳解] | |
MGPosition | operator+ (const MGPosition &p1, const MGPosition &p2) |
MGPosition | operator+ (const MGVector &v, const MGPosition &p) |
MGVector | operator- (const MGPosition &p1, const MGPosition &p2) |
自身のPositionと与えられたPositionの減算してMGVectorを生成 [詳解] | |
MGPosition | operator- (const MGPosition &p1, const MGVector &v) |
自身のPositionと与えられたVectorの減算してMGPositionを生成 [詳解] | |
MGPosition | operator- (const MGVector &v, const MGPosition &p1) |
自身のPositionと与えられたVectorの減算してMGPositionを生成 [詳解] | |
double | operator% (const MGPosition &p1, const MGVector &v) |
MG_DLL_DECLR friend MGPosition | operator* (const MGPosition &p1, const MGMatrix &mat) |
MG_DLL_DECLR friend MGPosition | operator* (const MGPosition &p1, const MGTransf &tr) |
MGPosition | operator* (double s, const MGPosition &p) |
MGPosition | operator* (const MGPosition &p1, double s) |
Scalarの乗算を行いPositionを生成 [詳解] | |
MGPosition | operator/ (const MGPosition &p1, double s) |
MG_DLL_DECLR friend std::ostream & | operator<< (std::ostream &, const MGPosition &) |
Debug Function. [詳解] | |
MG_DLL_DECLR friend bool | operator== (const MGPosition &p1, const MGPosition &p2) |
MG_DLL_DECLR friend bool | operator== (const MGVector &p1, const MGPosition &p2) |
MG_DLL_DECLR friend bool | operator== (const MGPosition &p1, const MGVector &p2) |
bool | operator!= (const MGPosition &p1, const MGPosition &p2) |
bool | operator!= (const MGVector &p1, const MGPosition &p2) |
bool | operator!= (const MGPosition &p1, const MGVector &p2) |
bool | operator< (const MGPosition &p1, const MGPosition &p2) |
bool | operator<= (const MGPosition &p1, const MGPosition &p2) |
bool | operator> (const MGPosition &p1, const MGPosition &p2) |
bool | operator>= (const MGPosition &p1, const MGPosition &p2) |
Represent a positional data.
MGPosition::MGPosition | ( | const MGPoint & | point | ) |
Conversion Constructor from a point.
|
inline |
Conversion Constructor from a vector.
|
inlineexplicit |
Void constructor void コンストラクタ
|
inline |
Construct 2D position by providing x,y coordinate data.
|
inline |
Construct 3D position by providing x,y,z coordinate data.
|
inline |
Construct 4D position by providing x,y,z,w coordinate data.
|
inline |
double の配列でcoordinate valueを指定しPositionを生成する。 Construct sdim space dimension positional data providing each coordinate data through doble array. ***** This is the fundamental constructor.*****
|
inline |
Construct position by copying old position, changing space dimension and ordering of old coordinates.
|
inline |
Construct from std::vector<double>
double MGPosition::angle | ( | const MGPosition & | start, |
const MGPosition & | end, | ||
const MGVector & | normal | ||
) | const |
Let this be the center of the rotation, then compute the angle rotated around the normal from start to end. angle(start,end,normal)+angle(end,start,normal)=2*pai always holds.
MGPosition& MGPosition::clear | ( | double | init = 0.0 | ) |
Clear all the element by the value init.
|
inline |
Construct new surface object by copying to newed area. User must delete this copied object by "delete".
double MGPosition::closest | ( | const MGCurve & | curve | ) | const |
Compute the closest point parameter value of the curve from this point. Function's return value is the parameter value of the curve.
MGPosition MGPosition::closest | ( | const MGSurface & | surf | ) | const |
Compute the closest point parameter value (u,v)of the surface from this point.
|
inline |
Return the 1st address of the array of the point double data.
|
inline |
double MGPosition::distance | ( | const MGPosition & | P2 | ) | const |
Return the distance of this and P2.
int MGPosition::dump | ( | MGOfstream & | ) | const |
Dump Function.
int MGPosition::dump_size | ( | ) | const |
Dump Functions.
MGPosition MGPosition::interpolate | ( | double | t2, |
const MGPosition & | vec2 | ||
) | const |
Generate a Position by interpolating two Position. Input scalar is a ratio t2. When t2 is zero, output position is a copy of the own position. Output=(this)(1-t2)+vec2*t2.
|
inline |
Test if this, P2, and P3 are on a single straight line. Function's return value is true if the three points are on a straight, false if not.
|
inline |
Test if this is null.
|
inline |
Positionと原点との距離を求める。 Return the lenght between the origin(0,0,0) and the position.
bool MGPosition::on | ( | const MGCurve & | curve, |
double & | t | ||
) | const |
点が曲線上にあるかを調べる。曲線上にあれば,そのパラメーター値を, なくても最近傍点のパラメータ値を返す。 Test if the position is on a curve. If on, return the parameter value. Even if not on, return the nearest point of the curve. Function's return value is >0 if the point is on the curve, and 0 if the point is not on the curve.
curve | Curve |
t | Parameter value of the nearest point on the curve. |
bool MGPosition::on | ( | const MGSurface & | surf, |
MGPosition & | uv | ||
) | const |
点が曲面上にあるかを調べる。曲面上にあれば,そのパラメーター値を, なくても最近傍点のパラメータ値を返す。 Test if the position is on a surface. If on, return the parameter value. Even if not on, return the nearest point of the surface. Function's return value is >0 if the point is on the curve, and 0 if the point is not on the curve.
surf | Surface pointer |
uv | Parameter value of the nearest point on surface. |
|
inline |
|
inline |
Access to i-th element.
MGPosition& MGPosition::operator*= | ( | double | scale | ) |
Scalarの乗算を行い自身のPositionとする Scaling of the position.
MGPosition& MGPosition::operator*= | ( | const MGMatrix & | ) |
MatrixによるPositionの変換を行い自身のPositionとする Matrix transformation of the position.
MGPosition& MGPosition::operator*= | ( | const MGTransf & | ) |
PositionのTransformを行いPositionを生成して, 自身のPositionとする General transformation of the position.
MGPosition& MGPosition::operator+= | ( | const MGVector & | vec | ) |
自身のPositionに与えられたPositionを加算して自身のPositionとする Translation of the position.
MGPosition& MGPosition::operator+= | ( | const MGPosition & | pos | ) |
MGPosition MGPosition::operator- | ( | ) | const |
単項マイナス。自身のPositionを反転し、Objectを生成 Unary minus. Negate all of the elements of the position.
MGPosition& MGPosition::operator-= | ( | const MGVector & | vec | ) |
自身のPositionから与えられたVectorを減算し自身のPositionとする Translation of the position.
MGPosition& MGPosition::operator/= | ( | double | ) |
Scalar除算を行い自身のPositionとする Scaling of the position.
MGPosition& MGPosition::operator= | ( | const double * | a | ) |
Copy constructor MGPosition ( const MGPosition& ); We use default copy constructor. Assignment Update position data by array of double.
|
inline |
Return i-th element of the position.
int MGPosition::out_to_IGES | ( | MGIgesOfstream & | igesfile, |
int | SubordinateEntitySwitch = 0 |
||
) | const |
PD116=Point. Function's return value is the directory entry id created.
double MGPosition::param | ( | const MGCurve & | crv | ) | const |
Return curve's parameter value of this point. If this point is not on the curve, return the nearest point's parameter value on the curve.
MGPosition MGPosition::param | ( | const MGSurface & | srf | ) | const |
Return surface's parameter value of this point. If this point is not on the surface, return the nearest point's parameter value on the surface.
MGCParam_list MGPosition::perps | ( | const MGCurve & | crv | ) | const |
Compute all foot points of the perpendicular line from this point to a curve. ポイントから与曲線へ下ろした垂線の足の,曲線のパラメータ値を すべて求める。
crv | Curve |
MGPosition_list MGPosition::perps | ( | const MGSurface & | srf | ) | const |
Compute all foot points of the perpendicular line from this point to a surface. ポイントから与曲面へ下ろした垂線の足の,曲面のパラメータ値を すべて求める。
srf | Surface |
自身の点を原点からこの点までのベクトルとして ベクトル(v2)に射影したベクトルを求める。 v2 が 零ベクトルのとき(*this)が返る。
|
inline |
|
inline |
Resize the position, that is , change the space dimension. When this is enlarged, the extra space will contain garbages.
int MGPosition::restore | ( | MGIfstream & | ) |
Restore Function.
|
inline |
Get the space dimension.
|
inline |
Set this as a null position.
void MGPosition::store_at | ( | int | i, |
const MGVector & | vec2, | ||
int | j = 0 |
||
) |
void MGPosition::store_at | ( | int | i, |
const MGVector & | vec2, | ||
int | j, | ||
int | len | ||
) |
Store vec2 data into *this. Storing will be done rap-around. That is, if id i or j reached to each sdim(), the id will be changed to 0.
i | Displacement of *this. |
vec2 | Vector 2. |
j | Displacement of vec2. |
len | Length to store |
|
inline |
swap two coordinates. swap coordinates (i) and (j).
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
自身の点と与えられたベクトルの内積を行う Inner product of a osition and a vector.
|
friend |
MatrixによるPositionの変換を行いObjectを生成 Matrix transformation of the position.
|
friend |
PositionのTransformを行いVectorを生成 General transformation of the position.
|
friend |
PositionのScalar乗算を行いObjectを生成 Scaling of the position.
|
friend |
Scalarの乗算を行いPositionを生成
|
friend |
Translation of the position.
|
friend |
|
friend |
|
friend |
自身のPositionと与えられたPositionの減算してMGVectorを生成
|
friend |
自身のPositionと与えられたVectorの減算してMGPositionを生成
|
friend |
自身のPositionと与えられたVectorの減算してMGPositionを生成
|
friend |
Scalar除算を行いObjectを生成 Scaling of the position.
|
friend |
Test if this position is less than p2. Comparison depends on two positions' length.
|
friend |
Debug Function.
|
friend |
|
friend |
与えられたPositionの成分の値を比較し、同じであれば TRUE を返却 Comparison of two positions.
|
friend |
|
friend |
|
friend |
|
friend |