MGCL V10
V10
MGCL V10
|
Defines Tangent Plane Line B-Representation Class. [詳解]
公開メンバ関数 | |
MGSBRepVecTP () | |
Default Constructor, will be set as no TPs' are specified. [詳解] | |
MGSBRepVecTP (const MGSBRepVecTP &vectp2) | |
MGSBRepVecTP (const MGSBRepTP &tp2) | |
Conversion constructor from ordinary MGSBRepTP. [詳解] | |
MGSBRepVecTP & | operator= (const MGSBRepVecTP &vectp2) |
void | change_range (bool along_u, double t0, double t1) |
change the parameter range to (t0,t1). [詳解] | |
void | change_range (bool along_u, const MGInterval &prange) |
change the parameter range to prange. [詳解] | |
bool | eval (int i, double t, MGVector &normal) const |
double | get_perimeters_max_cos (const MGPvector< MGLBRep > &deris, double taumax[4], double cosmax[4]) const |
double | get_perimeters_max_sin (const MGSurface &srf, double taumax[4], double sinmax[4], bool *eval=0) const |
bool | specified (int i) const |
void | set_TP_null (int i) |
Set i-th perimeter's TP as a null, as an unspecified one. [詳解] | |
void | set_TP (int i, MGPvector< MGLBRep > &vectp, const MGInterval &prange) |
void | set_TP (int i, std::vector< MGLBRep * > &vectp, const MGInterval &prange) |
const MGPvector< MGLBRep > & | vecTP (int i) const |
Return i-th perimeter's TP. [詳解] | |
MGPvector< MGLBRep > & | vecTP (int i) |
MGPvector< MGLBRep > * | vecTP () |
フレンド | |
MG_DLL_DECLR friend std::ostream & | operator<< (std::ostream &ostrm, const MGSBRepVecTP &vectp) |
String stream Function. [詳解] | |
Defines Tangent Plane Line B-Representation Class.
Tangent plane is a line b-representation of (unit)normal vector of tangent plane along a surface perimeter. MGSBRepVecTP has a vector of 4 newed object pointer ofMGLBRep representing the normal vetor B-rep along the 4 perimeter of surface. And regarding to their ownership MGSBRepVecTP acts just like std::auto_ptr. That is, all of the ownership will be transfered to the copied, or assigned object. See the copy oroperator=() below.
|
inline |
Default Constructor, will be set as no TPs' are specified.
MGSBRepVecTP::MGSBRepVecTP | ( | const MGSBRepVecTP & | vectp2 | ) |
Copy Constructor. all of the ownership of m_TP of tp2 will be transfered to this object.
void MGSBRepVecTP::change_range | ( | bool | along_u, |
double | t0, | ||
double | t1 | ||
) |
change the parameter range to (t0,t1).
along_u | the objective range is along u parameter or v. |
t0 | target range, from t0, |
t1 | to t1. |
void MGSBRepVecTP::change_range | ( | bool | along_u, |
const MGInterval & | prange | ||
) |
change the parameter range to prange.
along_u | the objective range is along u parameter or v. |
prange | target range. |
bool MGSBRepVecTP::eval | ( | int | i, |
double | t, | ||
MGVector & | normal | ||
) | const |
evaluate TP at the perimeter i's parameter t. Function's return value is: true if t was inside the parameter range of a tangent plane of m_TP[i]. false if t was outside the parameter range of the m_TP[i] for all i.
i | perimeter numeber. |
t | parameter vaule of perimeter i. |
normal | evaluated normal will be returned. |
double MGSBRepVecTP::get_perimeters_max_cos | ( | const MGPvector< MGLBRep > & | deris, |
double | taumax[4], | ||
double | cosmax[4] | ||
) | const |
Compute the maximum (absolute) cos value of between vector deris[i](t) and vector this->TP(i)(t) for i=0,1,2,3, where t is a common parameter of the data point obtained from deris[i]'s knot vector. Function's return value is the max out of cosmax[.].
deris | the size must be 4 |
taumax | parameter on which the maximum value attains will be stored |
cosmax | the maximum value will be stored |
double MGSBRepVecTP::get_perimeters_max_sin | ( | const MGSurface & | srf, |
double | taumax[4], | ||
double | sinmax[4], | ||
bool * | eval = 0 |
||
) | const |
Compute the maximum (absolute) sin value of between vector srf.normal(uv(t)) and vector this->TP(i)(t) for i=0,1,2,3, where perim[i] is the same as srf.perimeter_curve(i), and t is a common parameter of deris[i] and TP(i). Function's return value is the max out of sinmax[.].
srf | surface which must corresponds to this object |
taumax | parameters on which the maximum value attains will be stored. |
sinmax | the maximum value will be stored. |
eval | indicates perimeters to evalate if eval!=null When eval[i] is true, perimeter i is evaluated for 0<=i<=3. |
MGSBRepVecTP& MGSBRepVecTP::operator= | ( | const MGSBRepVecTP & | vectp2 | ) |
Assignment. all of the ownership of m_TP of tp2 will be transfered to this object.
void MGSBRepVecTP::set_TP | ( | int | i, |
MGPvector< MGLBRep > & | vectp, | ||
const MGInterval & | prange | ||
) |
Set i-th perimeter's TP(copy version). vectp[i] must be newed objects, and all of the ownership will be transferer to this instance.
i | perimeter numeber. |
vectp | TP data. |
prange | Whole perimeter's parameter range. |
void MGSBRepVecTP::set_TP | ( | int | i, |
std::vector< MGLBRep * > & | vectp, | ||
const MGInterval & | prange | ||
) |
Set i-th perimeter's TP(std::vector version). vectp[i] must be newed objects, and all of the ownership will be transferer to this instance.
i | perimeter number. |
vectp | TP data. |
prange | Whole perimeter's parameter range. |
void MGSBRepVecTP::set_TP_null | ( | int | i | ) |
Set i-th perimeter's TP as a null, as an unspecified one.
|
inline |
Return true if at least one TP is specified at i-th perimeter. i=0, 2 are v=min and max u-parameter line. i=1, 3 are u=max and min v-parameter line.
|
friend |
String stream Function.