|
MGCL V10
V10
MGCL V10
|
Defines Spoint seq of a space dimension and of a size. [詳解]
公開メンバ関数 | |
| MGSPointSeq (int sizeu=0, int sizev=0, int dim=0) | |
| MGSPointSeq (int dim, const MGSPointSeq &old_brep, int start1=0, int start2=0) | |
| MGSPointSeq (const MGSPointSeq &rhs) | |
| Copy constructor. [詳解] | |
| ~MGSPointSeq () | |
| MGSPointSeq & | operator= (const MGSPointSeq &) |
| Assignment. [詳解] | |
| double & | operator() (int i, int j, int k) |
| Access to (i,j,k)th element. [詳解] | |
| double | operator() (int i, int j, int k) const |
| MGVector | operator() (int i, int j) const |
| Extract (i,j,k) elements for 0<=k<sdim() as a vector. [詳解] | |
| MGSPointSeq | operator+ (const MGVector &) const |
| MGSPointSeq & | operator+= (const MGVector &) |
| MGSPointSeq | operator- (const MGVector &) const |
| MGSPointSeq & | operator-= (const MGVector &) |
| MGSPointSeq | operator* (double) const |
| MGSPointSeq & | operator*= (double) |
| MGSPointSeq | operator* (const MGMatrix &) const |
| MGSPointSeq & | operator*= (const MGMatrix &) |
| MGSPointSeq | operator* (const MGTransf &) const |
| MGSPointSeq & | operator*= (const MGTransf &) |
| MGSPointSeq | operator+ (const MGSPointSeq &sp2) const |
| Add and subtract operation of two MGSPointSeq. [詳解] | |
| MGSPointSeq & | operator+= (const MGSPointSeq &sp2) |
| MGSPointSeq | operator- (const MGSPointSeq &sp2) const |
| MGSPointSeq & | operator-= (const MGSPointSeq &sp2) |
| bool | operator== (const MGSPointSeq &) const |
| bool | operator!= (const MGSPointSeq &brep) const |
| Return true if not equal. [詳解] | |
| int | average_plane (MGPosition ¢er, MGPlane &plane, MGStraight &line, double &deviation) const |
| MGBox | box () const |
| Compute minimum box including all the points. [詳解] | |
| const double * | data (int i=0, int j=0, int k=0) const |
| Returns a pointer to the area. [詳解] | |
| double * | data (int i=0, int j=0, int k=0) |
| Returns a pointer to the area. [詳解] | |
| MGSPointSeq & | homogeneous_transform (double) |
| MGSPointSeq & | homogeneous_transform (const MGVector &) |
| Add the vector. [詳解] | |
| MGSPointSeq & | homogeneous_transform (const MGMatrix &) |
| Multiply the matrix. [詳解] | |
| MGSPointSeq & | homogeneous_transform (const MGTransf &) |
| Multiply the transform. [詳解] | |
| bool | is_null () const |
| Test if this is a null SPointSeq. [詳解] | |
| void | length (int &lengthu, int &lengthv) const |
| Returns the actual size of Spoint seq. [詳解] | |
| int | length_u () const |
| Returns the actual size of Spoint seq. [詳解] | |
| int | length_v () const |
| Returns the actual size of Spoint seq. [詳解] | |
| void | make_data_point (MGNDDArray &utau, MGNDDArray &vtau) const |
| MGSPointSeq | non_homogeneous () const |
| double | ref (int i, int j, int k=0) const |
| void | reshape (int sizeu, int suzev, int startu=0, int startv=0) |
| Update size. Update of sdim not allowed. [詳解] | |
| void | resize (int lenu, int lenv, int dim) |
| void | reverse (int is_u) |
| Reverse the ordering of the points. [詳解] | |
| int | sdim () const |
| Returns the space dimension. [詳解] | |
| void | set_null () |
| Set this as a null. [詳解] | |
| void | set_length (int lengthu, int lengthv) |
| Set the length of effective data. [詳解] | |
| void | capacity (int &capau, int &capav) const |
| Returns the sizes along u and v direction. [詳解] | |
| int | capacity_u () const |
| Returns the size of u-direction. [詳解] | |
| int | capacity_v () const |
| Returns the size of v-direction. [詳解] | |
| void | store_at (int i, int j, const MGVector &vctr, int to=0, int from=0) |
| void | store_at (int i, int j, const MGVector &vctr, int to, int from, int len) |
| void | store_at (int i, int j, const double *data, int to=0) |
| void | store_BP_along_u_at (int j, const MGBPointSeq &bp, int to=0, int from=0) |
| void | store_BP_along_v_at (int i, const MGBPointSeq &bp, int to=0, int from=0) |
| int | dump_size () const |
| Dump Functions. [詳解] | |
| int | dump (MGOfstream &) const |
| Dump Function. [詳解] | |
| int | restore (MGIfstream &) |
| Restore Function. [詳解] | |
フレンド | |
| MG_DLL_DECLR friend MGSPointSeq | operator* (double scale, const MGSPointSeq &) |
| MG_DLL_DECLR friend std::ostream & | operator<< (std::ostream &out, const MGSPointSeq &sp) |
| SDtring stream Function. [詳解] | |
Defines Spoint seq of a space dimension and of a size.
MGSPointSeq is designed to represent a control polygon network of B-Spline surface. MGSPointSeq has its capacity and actual length used. The dimensioning is like MGSPointSeq spoint(i,j,k). i has u direction length nu, j has v direction length nv, and k has space dimension sd. Then minimum area size is nu*nv*sd, and 0<=i<nu, 0<=j<nv, 0<=k<sd.
|
explicit |
Of m_lenght=size(for u and v dierction), Dimensioning of MGSointSeq is MGSPointSeq(i,j,k). i:u-direction, j:v-direction, k:space dimension.
| sizeu | size of u-direction |
| sizev | size of v-direction |
| dim | space dimension |
| MGSPointSeq::MGSPointSeq | ( | int | dim, |
| const MGSPointSeq & | old_brep, | ||
| int | start1 = 0, |
||
| int | start2 = 0 |
||
| ) |
Construct a MGSPointSeq by copying original MGSPointSeq. Can change the ordering of coordinates
| dim | New Space Dimension. |
| old_brep | Origianl B-Rep. |
| start1 | Destination start space dimension order to store. |
| start2 | Source start space dimension order to retrieve. |
| MGSPointSeq::MGSPointSeq | ( | const MGSPointSeq & | rhs | ) |
Copy constructor.
|
inline |
| int MGSPointSeq::average_plane | ( | MGPosition & | center, |
| MGPlane & | plane, | ||
| MGStraight & | line, | ||
| double & | deviation | ||
| ) | const |
compute an average plane of the point sequence. Function's return value is: 1: Point seq is a point. 2: Point seq is on a line. 3: Plane is output.
| center | center of point seq will be output. |
| plane | Plane will be output, when average_plane=3. |
| line | Straight line will be output =2. |
| deviation | Maximum deviation from point, line, or plane will be output. |
| MGBox MGSPointSeq::box | ( | ) | const |
Compute minimum box including all the points.
|
inline |
Returns the sizes along u and v direction.
|
inline |
Returns the size of u-direction.
|
inline |
Returns the size of v-direction.
| const double* MGSPointSeq::data | ( | int | i = 0, |
| int | j = 0, |
||
| int | k = 0 |
||
| ) | const |
Returns a pointer to the area.
| double* MGSPointSeq::data | ( | int | i = 0, |
| int | j = 0, |
||
| int | k = 0 |
||
| ) |
Returns a pointer to the area.
| int MGSPointSeq::dump | ( | MGOfstream & | ) | const |
Dump Function.
| int MGSPointSeq::dump_size | ( | ) | const |
Dump Functions.
| MGSPointSeq& MGSPointSeq::homogeneous_transform | ( | double | ) |
Transformation of own for rational(MGRLBRep) Control Polygon. Scaling.
| MGSPointSeq& MGSPointSeq::homogeneous_transform | ( | const MGVector & | ) |
Add the vector.
| MGSPointSeq& MGSPointSeq::homogeneous_transform | ( | const MGMatrix & | ) |
Multiply the matrix.
| MGSPointSeq& MGSPointSeq::homogeneous_transform | ( | const MGTransf & | ) |
Multiply the transform.
|
inline |
Test if this is a null SPointSeq.
|
inline |
Returns the actual size of Spoint seq.
|
inline |
Returns the actual size of Spoint seq.
|
inline |
Returns the actual size of Spoint seq.
| void MGSPointSeq::make_data_point | ( | MGNDDArray & | utau, |
| MGNDDArray & | vtau | ||
| ) | const |
Generate data point abscissa(utau=u-direction and vtau=v-direction) from data point ordinates SPointSeq. SPointSeq(*this) must be homogeneous, i.e. if SPointSeq is positional data, all of them must be positional data, should not include derivative data.
| MGSPointSeq MGSPointSeq::non_homogeneous | ( | ) | const |
Compute non_homogeneous coordonate data without w coordinate element, assumed that this is homogeneous coordinate data, i.e., maximum space dimension element is w(weight) coordinate. Result data does not include weight elements.
|
inline |
Return true if not equal.
| double& MGSPointSeq::operator() | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Access to (i,j,k)th element.
|
inline |
| MGVector MGSPointSeq::operator() | ( | int | i, |
| int | j | ||
| ) | const |
Extract (i,j,k) elements for 0<=k<sdim() as a vector.
| MGSPointSeq MGSPointSeq::operator* | ( | double | ) | const |
与えられたスケーリングで曲線の変換を行いオブジェクトを生成する。 Scaling.
| MGSPointSeq MGSPointSeq::operator* | ( | const MGMatrix & | ) | const |
与えられた変換で曲線の変換を行いオブジェクトを生成する。 Matrix transformation.
| MGSPointSeq MGSPointSeq::operator* | ( | const MGTransf & | ) | const |
与えられた変換で曲線のトランスフォームを行いオブジェクトを生成する。 General transformation.
| MGSPointSeq& MGSPointSeq::operator*= | ( | double | ) |
与えられたスケーリングで曲線の変換を行い自身の曲線とする。 Scaling.
| MGSPointSeq& MGSPointSeq::operator*= | ( | const MGMatrix & | ) |
与えられた変換で曲線の変換を行い自身の曲線とする。 Matrix transformation.
| MGSPointSeq& MGSPointSeq::operator*= | ( | const MGTransf & | ) |
与えられた変換で曲線のトランスフォームを行い自身とする。 General transformation.
| MGSPointSeq MGSPointSeq::operator+ | ( | const MGVector & | ) | const |
曲線の平行移動を行いオブジェクトを生成する。 Translation.
| MGSPointSeq MGSPointSeq::operator+ | ( | const MGSPointSeq & | sp2 | ) | const |
Add and subtract operation of two MGSPointSeq.
| MGSPointSeq& MGSPointSeq::operator+= | ( | const MGVector & | ) |
与ベクトルだけ曲線を平行移動して自身とする。 Translation.
| MGSPointSeq& MGSPointSeq::operator+= | ( | const MGSPointSeq & | sp2 | ) |
| MGSPointSeq MGSPointSeq::operator- | ( | const MGVector & | ) | const |
曲線の逆方向に平行移動を行いオブジェクトを生成する。 Translation.
| MGSPointSeq MGSPointSeq::operator- | ( | const MGSPointSeq & | sp2 | ) | const |
| MGSPointSeq& MGSPointSeq::operator-= | ( | const MGVector & | ) |
与ベクトルだけ曲線をマイナス方向に平行移動して自身とする。 Translation.
| MGSPointSeq& MGSPointSeq::operator-= | ( | const MGSPointSeq & | sp2 | ) |
| MGSPointSeq& MGSPointSeq::operator= | ( | const MGSPointSeq & | ) |
Assignment.
| bool MGSPointSeq::operator== | ( | const MGSPointSeq & | ) | const |
Compare two SpointSeq if they are equal. Return true if equal.
| double MGSPointSeq::ref | ( | int | i, |
| int | j, | ||
| int | k = 0 |
||
| ) | const |
Return (i,j)-th element data. When k>=sdim(), returns 0.0 .
| void MGSPointSeq::reshape | ( | int | sizeu, |
| int | suzev, | ||
| int | startu = 0, |
||
| int | startv = 0 |
||
| ) |
Update size. Update of sdim not allowed.
| sizeu | New size about u |
| suzev | about v |
| startu | To which place to store the original data |
| startv | along u and v direction. |
| void MGSPointSeq::resize | ( | int | lenu, |
| int | lenv, | ||
| int | dim | ||
| ) |
Change the size of the array to m_lengthu=m_capacityu=lenu, m_lengthv=m_capacityv=lenv, m_sdim=dim. Result will contain garbages.
| int MGSPointSeq::restore | ( | MGIfstream & | ) |
Restore Function.
| void MGSPointSeq::reverse | ( | int | is_u | ) |
Reverse the ordering of the points.
| is_u | if true, u-drection. if not, v. |
|
inline |
Returns the space dimension.
| void MGSPointSeq::set_length | ( | int | lengthu, |
| int | lengthv | ||
| ) |
Set the length of effective data.
| void MGSPointSeq::set_null | ( | ) |
Set this as a null.
| void MGSPointSeq::store_at | ( | int | i, |
| int | j, | ||
| const MGVector & | vctr, | ||
| int | to = 0, |
||
| int | from = 0 |
||
| ) |
Store vector data vector(from+r) to this(i,j,to+r) for 0<=r<sdim(). When (form+r) or (to+r) reached to maximum space dimension id, next id becomes 0(form the start).
| i | 1st id of this which indicates the placement. |
| j | 2nd id of this which indicates the placement. |
| vctr | Input vector. |
| to | Indicates to where of this in the space dimension id. |
| from | Indicates from where of vector in the space dimension. |
| void MGSPointSeq::store_at | ( | int | i, |
| int | j, | ||
| const MGVector & | vctr, | ||
| int | to, | ||
| int | from, | ||
| int | len | ||
| ) |
Store vector data vector(from+r) to this(i,j,to+r) for 0<=r<sdim(). When (form+r) or (to+r) reached to maximum space dimension id, next id becomes 0(form the start).
| i | 1st id of this which indicates the placement. |
| j | 2nd id of this which indicates the placement. |
| vctr | Input vector. |
| to | Indicates to where of this in the space dimension id. |
| from | Indicates from where of vector in the space dimension. |
| len | Length of data to store. |
| void MGSPointSeq::store_at | ( | int | i, |
| int | j, | ||
| const double * | data, | ||
| int | to = 0 |
||
| ) |
Store data[r] data to this(i,j,to+r) for 0<=r<sdim(). When (to+r) reached to maximum space dimension id, next id becomes 0(form the start).
| i | 1st id of this which indicates the placement. |
| j | 2nd id of this which indicates the placement. |
| data | Input data array. |
| to | Indicates to where of this in the space dimension id. |
| void MGSPointSeq::store_BP_along_u_at | ( | int | j, |
| const MGBPointSeq & | bp, | ||
| int | to = 0, |
||
| int | from = 0 |
||
| ) |
Store BPointSeq along u at v's id j. That is, data bp(i,from+r) to this(i,j,to+r) for i=0,..., length_u()-1, and 0<=r<sdim(). When (form+r) or (to+r) reached to maximum space dimension id, next id becomes 0(form the start).
| j | id of this which indicates the placement. |
| bp | Input vector. |
| to | Indicates to where of this in the space dimension id. |
| from | Indicates from where of vector in the space dimension. |
| void MGSPointSeq::store_BP_along_v_at | ( | int | i, |
| const MGBPointSeq & | bp, | ||
| int | to = 0, |
||
| int | from = 0 |
||
| ) |
Store BPointSeq along v at u's id i. That is, data bp(j,from+r) to this(i,j,to+r) for j=0,..., length_v()-1, and 0<=r<sdim(). When (form+r) or (to+r) reached to maximum space dimension id, next id becomes 0(form the start).
| i | id of this which indicates the placement. |
| bp | Input vector. |
| to | Indicates to where of this in the space dimension id. |
| from | Indicates from where of vector in the space dimension. |
|
friend |
与えられたスケーリングで曲線の変換を行いオブジェクトを生成する。 Scaling.
|
friend |
SDtring stream Function.