MGCL V10
V10
MGCL V10
|
MGHHisect is to represent one continuous intersection line of shells. [詳解]
公開型 | |
typedef std::deque< MGFPline > | container_type |
typedef container_type::iterator | iterator |
typedef container_type::const_iterator | const_iterator |
公開メンバ関数 | |
MGHHisect () | |
MGHHisect (const MGHHisect &hhi) | |
void constructor. [詳解] | |
MGHHisect (const MGFSurface *face1, const MGFSurface *face2, MGSSisect &ssi) | |
Construct from MGSSisect. [詳解] | |
MGHHisect (MGCurve *iline, const MGFSurface *face1, MGCurve *uvline1, const MGFSurface *face2=0, MGCurve *uvline2=0) | |
~MGHHisect () | |
MGHHisect & | operator= (const MGHHisect &hhi) |
Assignment. [詳解] | |
bool | operator< (const MGHHisect &hhi2) const |
Comparison operator. [詳解] | |
bool | operator> (const MGHHisect &hhi2) const |
bool | operator<= (const MGHHisect &hhi2) const |
bool | operator>= (const MGHHisect &hhi2) const |
bool | operator== (const MGHHisect &hhi2) const |
bool | operator!= (const MGHHisect &hhi2) const |
void | build_one (MGHHisect &hhi) |
void | build_one (MGHHisect_vector &hhivec) |
void | change_range (double t0, double t1) |
void | connect_line_to_end (MGCurve *iline, const MGFSurface *face1, MGCurve *uvline1, const MGFSurface *face2=0, MGCurve *uvline2=0) |
void | connect_line_to_end (MGHHisect &hhi2) |
void | connect_line_to_start (MGCurve *iline, const MGFSurface *face1, MGCurve *uvline1, const MGFSurface *face2=0, MGCurve *uvline2=0) |
void | connect_line_to_start (MGHHisect &hhi2) |
bool | has_face2_data () const |
Test if this has face2's information. [詳解] | |
const MGCurve & | iline () const |
Return the world coordinate isect data. [詳解] | |
MGCurve & | iline () |
bool | is_null () const |
Test if this is a null HHisect or not. [詳解] | |
double | param_e () const |
double | param_s () const |
void | reverse_direction () |
Reverse the direction of this intersection line. [詳解] | |
int | num_of_uvline () const |
return number of uvlines. [詳解] | |
void | release_back (MGCurve *&ilineLast, MGFPline uvline1Last, MGFPline uvline2Last) |
void | release_front (MGCurve *&iline1st, MGFPline uvline11st, MGFPline uvline21st) |
MGCompositeCurve * | release_line () |
const std::deque< MGFPline > & | uvlines1 () const |
Return uvline1. [詳解] | |
const std::deque< MGFPline > & | uvlines2 () const |
Return uvline2. [詳解] | |
const MGFPline & | uvline1 (int i) const |
Return i-th uvline. [詳解] | |
const MGFPline & | uvline2 (int i) const |
void | exchange12 () |
フレンド | |
MG_DLL_DECLR friend std::ostream & | operator<< (std::ostream &ostrm, const MGHHisect &hhi) |
String stream Function. [詳解] | |
MGHHisect is to represent one continuous intersection line of shells.
Intersection lines a shell with a shell, a face, or a surface. (MGCompositeCurve* iline, deque<MGFPline> uvl1, deque<MGFPline> uvl2) where iline is a world coordinate rep of the line, uvl1 is a deque of 1st shell's face parameter rep, uvl2 is a deque of the 2nd shell's or face's parameter rep of the intersection line. uvl1[i] corresponds to uvl2[i] one by one for all i. The parameter ranges of all the uvl1[i] are continuous and the total of them is equal to the parameter range of iline. For uvl2, the same. Let uvl1[i]'s start parameter be t1, and end parameter t2, then uvl2[i]'s parameter range is also from t1 to t2. Let sf1 be MGSurfCurve(f1's surface, uvl1[i]), then sf1 is the same curve as the iline's part of the parameter range t1 to t2. And sf1 is also equal to MGSurfCurve(f2's surface, uvl2[i]). MGHHisect uses MGFPline to represent the intersection lines. The behavior of MGHHisect(and MGFPline) is like an auto_ptr. Copy or assignment of MGHHisect means transfer of the ownership of all the included curves to copied or assigned MGHHisect and original MGHHisect does not have the ownership of the curves any more. Users should be aware of it. MGHHisect is also used to represent a pojection curve. In this case the size of uvline2 is zero. **** Projection line rep and intersection line rep cannot be mixed. ****
typedef container_type::const_iterator MGHHisect::const_iterator |
typedef std::deque<MGFPline> MGHHisect::container_type |
typedef container_type::iterator MGHHisect::iterator |
|
inline |
MGHHisect::MGHHisect | ( | const MGHHisect & | hhi | ) |
void constructor.
Copy constructor.
MGHHisect::MGHHisect | ( | const MGFSurface * | face1, |
const MGFSurface * | face2, | ||
MGSSisect & | ssi | ||
) |
MGHHisect::MGHHisect | ( | MGCurve * | iline, |
const MGFSurface * | face1, | ||
MGCurve * | uvline1, | ||
const MGFSurface * | face2 = 0 , |
||
MGCurve * | uvline2 = 0 |
||
) |
Construct two faces intersection lines. uvline1 and 2 makes uvlines whose vector length is 1. MGHHisect takes the ownership of iline, uvline1, and uvline2 (These must be newed objects). When face2 is null, and uvlines2!=null, it indicates face2 is actually a surface. When both of face2 and uvlines2 are null, it indivates (face2, uvline2) are not used. This case occurs when MGHHisect is used to represent projection lines.
iline | Intersection line of world coordinates. iline must be a newed object pointer and MGHHisect takes the ownership. |
face1 | face1. This must not be null. |
uvline1 | Intersection line of face1's (u,v) coordinates. uvline1 must be a newed object pointer and MGHHisect takes the ownership. |
face2 | When face2 is null, and uvlines2!=null, it indicates face2 is actually a surface. |
uvline2 | Intersection line of face2's (u,v) coordinates. Takes the ownership. |
MGHHisect::~MGHHisect | ( | ) |
void MGHHisect::build_one | ( | MGHHisect & | hhi | ) |
Extract a connected line from hhivec one by one and build one continuous line. Extracted lines will be released from hhivec.
void MGHHisect::build_one | ( | MGHHisect_vector & | hhivec | ) |
void MGHHisect::change_range | ( | double | t0, |
double | t1 | ||
) |
Change parameter range, be able to change the direction by providing t0 greater than t1.
t0 | Parameter value for the start of original. |
t1 | Parameter value for the end of original. |
void MGHHisect::connect_line_to_end | ( | MGCurve * | iline, |
const MGFSurface * | face1, | ||
MGCurve * | uvline1, | ||
const MGFSurface * | face2 = 0 , |
||
MGCurve * | uvline2 = 0 |
||
) |
Connect a line to this HHisect. When both of face2 and uvlines2 are null, it indivates (face2, uvline2) are not used. This case occurs when MGHHisect is used to represent projection lines. ****Projection lines rep. and intersection lines rep cannot be mixed. iline, uvline1, and uvline2(or hhi2) must have the same direction. iline's direction must be equal to this HHisect's. MGHHisect takes the ownership of iline, uvline1, and uvline2 (These must be newed objects).
iline | Intersection line of world coordinates. |
face1 | face1. This must not be null. |
uvline1 | Intersection line of face1's (u,v) coordinates. |
face2 | face2. This may be null (e.g. for face2 that is actually a surface). |
uvline2 | Intersection line of face2's (u,v) coordinates. takes the ownership of all the curves of ssi. |
void MGHHisect::connect_line_to_end | ( | MGHHisect & | hhi2 | ) |
hhi2 | After connected, this hhi2's member data's ownership will be transfered to this MGHHisect, just like std::auto_ptr's assignment. |
void MGHHisect::connect_line_to_start | ( | MGCurve * | iline, |
const MGFSurface * | face1, | ||
MGCurve * | uvline1, | ||
const MGFSurface * | face2 = 0 , |
||
MGCurve * | uvline2 = 0 |
||
) |
Connect a line to this HHisect. When both of face2 and uvlines2 are null, it indivates (face2, uvline2) are not used. This case occurs when MGHHisect is used to represent projection lines. ****Projection lines rep. and intersection lines rep cannot be mixed. iline, uvline1, and uvline2(or hhi2) must have the same direction. iline's direction must be opposite to this HHisect's. MGHHisect takes the ownership of iline, uvline1, and uvline2 (These must be newed objects).
iline | Intersection line of world coordinates. |
face1 | face1. This must not be null. |
uvline1 | Intersection line of face1's (u,v) coordinates. |
face2 | face2. This may be null (e.g. for face2 that is actually a surface). |
uvline2 | Intersection line of face2's (u,v) coordinates. takes the ownership of all the curves of ssi. |
void MGHHisect::connect_line_to_start | ( | MGHHisect & | hhi2 | ) |
hhi2 | After connected, this hhi2's member data's ownership will be transfered to this MGHHisect, just like std::auto_ptr's assignment. |
void MGHHisect::exchange12 | ( | ) |
exchange12 1st and 2nd lines. This can be used only for intersection line rep.
|
inline |
Test if this has face2's information.
|
inline |
Return the world coordinate isect data.
|
inline |
|
inline |
Test if this is a null HHisect or not.
|
inline |
return number of uvlines.
|
inline |
bool MGHHisect::operator< | ( | const MGHHisect & | hhi2 | ) | const |
Comparison operator.
|
inline |
bool MGHHisect::operator== | ( | const MGHHisect & | hhi2 | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Release the pointer of the last curve. Returned will be the released MGCurve pointer.
Release the pointer of the 1st curve. Returned will be the released MGCurve pointer.
|
inline |
Release the pointer of the iline curve. Returned will be the released MGCurve pointer.
void MGHHisect::reverse_direction | ( | ) |
Reverse the direction of this intersection line.
const MGFPline& MGHHisect::uvline1 | ( | int | i | ) | const |
Return i-th uvline.
const MGFPline& MGHHisect::uvline2 | ( | int | i | ) | const |
|
inline |
Return uvline1.
|
inline |
Return uvline2.
|
friend |
String stream Function.