MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
HHisect.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGHHisect_HH_
6 #define _MGHHisect_HH_
7 
12 #include <deque>
13 #include "mg/CompositeCurve.h"
14 #include "mg/FPline.h"
15 
16 class MGSSisect;
17 class MGFSurface;
18 class MGHHisect_vector;
19 
21 
43 class MG_DLL_DECLR MGHHisect{
44 
45 public:
46  typedef std::deque<MGFPline> container_type;
47 
48  typedef container_type::iterator iterator;
49  typedef container_type::const_iterator const_iterator;
50 
52 MG_DLL_DECLR friend std::ostream& operator<< (std::ostream& ostrm, const MGHHisect& hhi);
53 
55 MGHHisect():m_iline(0){;};
56 
58 MGHHisect(const MGHHisect& hhi);
59 
61 MGHHisect(
62  const MGFSurface* face1,
63  const MGFSurface* face2,
64  MGSSisect& ssi
66 );
67 
75 MGHHisect(
76  MGCurve* iline,
77  const MGFSurface* face1,
79  MGCurve* uvline1,
80  const MGFSurface* face2=0,
82  MGCurve* uvline2=0
84 );
86 
88 ~MGHHisect();
89 
91 
93 MGHHisect& operator=(const MGHHisect& hhi);
94 
96 bool operator< (const MGHHisect& hhi2)const;
97 bool operator> (const MGHHisect& hhi2)const{return hhi2<(*this);};
98 bool operator<= (const MGHHisect& hhi2)const{return !(hhi2<(*this));};
99 bool operator>= (const MGHHisect& hhi2)const{return !((*this)<hhi2);};
100 bool operator== (const MGHHisect& hhi2)const;
101 bool operator!= (const MGHHisect& hhi2)const{return !operator==(hhi2);};
102 
104 
107 void build_one(MGHHisect& hhi);
108 void build_one(MGHHisect_vector& hhivec);
109 
112 void change_range(
113  double t0,
114  double t1
115 );
116 
125 void connect_line_to_end(
126  MGCurve* iline,
127  const MGFSurface* face1,
128  MGCurve* uvline1,
129  const MGFSurface* face2=0,
130  MGCurve* uvline2=0
132 );
134 void connect_line_to_end(
135  MGHHisect& hhi2
136 );
139 
148 void connect_line_to_start(
149  MGCurve* iline,
150  const MGFSurface* face1,
151  MGCurve* uvline1,
152  const MGFSurface* face2=0,
153  MGCurve* uvline2=0
155 );
157 void connect_line_to_start(
158  MGHHisect& hhi2
159 );
162 
164 bool has_face2_data()const{return !m_uvlines2.empty();};
165 
167 const MGCurve& iline()const{return *m_iline;};
168 MGCurve& iline(){return *m_iline;};
169 
171 bool is_null()const{return m_iline==0;};
172 
173 double param_e()const{return m_iline->param_e();};
174 double param_s()const{return m_iline->param_s();};
175 
177 void reverse_direction();
178 
180 int num_of_uvline() const{return int(m_uvlines1.size());};
181 
184 void release_back(
185  MGCurve*& ilineLast,
186  MGFPline uvline1Last,
187  MGFPline uvline2Last
188 );
189 
192 void release_front(
193  MGCurve*& iline1st,
194  MGFPline uvline11st,
195  MGFPline uvline21st
196 );
197 
200 MGCompositeCurve* release_line(){MGCompositeCurve* a=m_iline; m_iline=0; return a;};
201 
203 const std::deque<MGFPline>& uvlines1() const{return m_uvlines1;};
204 
206 const std::deque<MGFPline>& uvlines2() const{return m_uvlines2;};
207 
209 const MGFPline& uvline1(int i)const;
210 const MGFPline& uvline2(int i)const;
211 
214 void exchange12();
215 
216 private:
217  mutable MGCompositeCurve* m_iline;
219  container_type m_uvlines1;
221  container_type m_uvlines2;
225 
226 };
227  // end of IsectContainer group
229 #endif
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
std::deque< MGFPline > container_type
Definition: HHisect.h:46
const std::deque< MGFPline > & uvlines2() const
Return uvline2.
Definition: HHisect.h:206
const std::deque< MGFPline > & uvlines1() const
Return uvline1.
Definition: HHisect.h:203
MGCompositeCurve is a composite of other leaf curves.
Definition: CompositeCurve.h:39
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
const MGCurve & iline() const
Return the world coordinate isect data.
Definition: HHisect.h:167
double param_e() const
Definition: HHisect.h:173
container_type::iterator iterator
Definition: HHisect.h:48
double param_s() const
Definition: HHisect.h:174
MGSSisect represents one intersection line of two surfaces.
Definition: SSisect.h:29
container_type::const_iterator const_iterator
Definition: HHisect.h:49
MGFSurface is an abstract class to provide the comman interfaces to MGFace and MGSurface.
Definition: FSurface.h:33
MGHHisect_vector defines a vector of MGHHisect.
Definition: HHisect_vector.h:28
Face's (u,v) parameter value line.
Definition: FPline.h:27
int num_of_uvline() const
return number of uvlines.
Definition: HHisect.h:180
MGCompositeCurve * release_line()
Definition: HHisect.h:200
bool has_face2_data() const
Test if this has face2's information.
Definition: HHisect.h:164
MGHHisect is to represent one continuous intersection line of shells.
Definition: HHisect.h:43
MGHHisect()
Definition: HHisect.h:55
bool is_null() const
Test if this is a null HHisect or not.
Definition: HHisect.h:171
MGCurve & iline()
Definition: HHisect.h:168