MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
SSisect.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGSSisect_HH_
6 #define _MGSSisect_HH_
7 
11 #include "mg/MGCL.h"
12 #include "mg/isect.h"
13 #include "mg/Curve.h"
14 
15 // MGSSisect.h
16 // Header for MGSSisect
17 
18 //Forward Declaration
19 class MGCurve;
20 
22 
29 class MG_DLL_DECLR MGSSisect:public MGisect{
30 
31 public:
32 
34 
37 :m_iline(0), m_param1(0), m_param2(0),m_rel(MGSSREL_UNKNOWN)
38 {;};
39 
42 MGSSisect(const MGSSisect& ssi);
43 
48  MGCurve* iline,
49  MGCurve* param1,
50  MGCurve* param2,
52 ):m_iline(iline), m_param1(param1), m_param2(param2), m_rel(r1){;};
53 
56 MGSSisect(
57  const MGCurve& iline,
58  const MGCurve& param1,
59  const MGCurve& param2,
61 );
62 
64 ~MGSSisect();
65 
67 
70 MGSSisect& operator= (const MGSSisect& ssi);
71 
73 bool operator< (const MGSSisect& ssi2)const;
74 bool operator> (const MGSSisect& ssi2)const{return ssi2<(*this);};
75 bool operator<= (const MGSSisect& ssi2)const{return !(ssi2<(*this));};
76 bool operator>= (const MGSSisect& ssi2)const{return !((*this)<ssi2);};
77 bool operator== (const MGSSisect& ssi2)const;
78 bool operator!= (const MGSSisect& ssi2)const{return !operator==(ssi2);};
79 
81 bool operator< (const MGisect& is)const;
82 bool operator< (const MGCCisect& is)const{return false;};
83 bool operator< (const MGCSisect& is)const{return false;};
84 bool operator< (const MGCFisect& is)const{return false;};
85 bool operator< (const MGFFisect& is)const{return true;};
86 bool operator== (const MGisect& is)const;
87 
89 
94 int has_common(const MGSSisect& ssi2)const;
95 
97 void exchange12(){replace12();};
98 
100 bool is_null()const{return m_iline==0;};
101 
103 const MGObject& isect()const{return *m_iline;};
104 
107 const MGCurve* isect1_param1()const{return m_param1;};
108 
111 const MGCurve* isect1_param2()const{return m_param2;};
112 
115 MGCurve& line() const{return *m_iline;}
116 
121 int manifold_dimension()const{return 1;};
122 
124 void negate();
125 
127 std::ostream& out(std::ostream& ostrm)const;
128 
132 MGCurve& param1() const{return *m_param1;}
133 
137 MGCurve& param2() const{return *m_param2;}
138 
141 MGSSRELATION rel() const{return m_rel;}
142 
146 MGCurve* release_line();
147 MGCurve* release_param1();
148 MGCurve* release_param2();
149 
151 MGSSisect& replace12();
152 
153 void set_null();
154 
155 private:
156 
158 
159  MGCurve* m_iline;
160  MGCurve* m_param1;
163  MGCurve* m_param2;
166  MGSSRELATION m_rel;
169 
171  friend class MGSSisect_list;
172 };
173  // end of IsectContainer group
175 #endif
MGCurve & param2() const
Definition: SSisect.h:137
virtual bool operator==(const MGisect &is) const =0
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
MGFFisect represents one intersection line of a MGFace and MGFace or MGSurface.
Definition: FFisect.h:31
Is a container of one intersection of two curves.
Definition: CCisect.h:24
virtual bool operator<=(const MGisect &is) const
Definition: isect.h:41
const MGObject & isect() const
Return the object of the intersection(world coordinates representation).
Definition: SSisect.h:103
MGSSisect()
Void constructou. 初期化なしでDummy交線を生成
Definition: SSisect.h:36
int manifold_dimension() const
Definition: SSisect.h:121
Definition: MGCL.h:211
MGSSisect(MGCurve *iline, MGCurve *param1, MGCurve *param2, const MGSSRELATION r1=MGSSREL_UNKNOWN)
Definition: SSisect.h:47
bool is_null() const
Test if this SSI is null.
Definition: SSisect.h:100
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
virtual bool operator>(const MGisect &is) const
Definition: isect.h:40
Is an abstract class to provide unified interfaces to handle an intersection of two objects...
Definition: isect.h:26
MGSSRELATION rel() const
Definition: SSisect.h:141
MGSSisect represents one intersection line of two surfaces.
Definition: SSisect.h:29
One Intersection of curve and surface.
Definition: CSisect.h:26
MGSSisect_list defines linked list of MGSSisect.
Definition: SSisect_list.h:26
MGCFisect is to represent an intersection of a face and a curve.
Definition: CFisect.h:24
virtual bool operator>=(const MGisect &is) const
Definition: isect.h:42
const MGCurve * isect1_param2() const
Definition: SSisect.h:111
MGCurve & line() const
Definition: SSisect.h:115
virtual bool operator!=(const MGisect &is) const
Definition: isect.h:44
const MGCurve * isect1_param1() const
Definition: SSisect.h:107
virtual std::ostream & out(std::ostream &ostrm) const =0
Output virtual function.
MGCurve & param1() const
Definition: SSisect.h:132
virtual bool operator<(const MGisect &is) const =0
Ordering functions.
void exchange12()
Exchange 1st and 2nd order of the parameter line representation.
Definition: SSisect.h:97
MGSSRELATION
Relation of Surface and Surface(SurfaceとSurfaceの交線の関係).
Definition: MGCL.h:210