MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
FFisect.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGFFisect_HH_
6 #define _MGFFisect_HH_
7 
11 #include "mg/MGCL.h"
12 #include "mg/isect.h"
13 #include "mg/Curve.h"
14 #include "mg/FPline.h"
15 #include "topo/Face.h"
16 
17 // MGFFisect.h
18 // Header for MGFFisect
19 
20 //Forward Declaration
21 class MGObject;
22 class MGCurve;
23 class MGFace;
24 
26 
31 class MG_DLL_DECLR MGFFisect:public MGisect{
32 
33 public:
34 
36 
38 MGFFisect():m_curve(0){;};
39 
44  MGCurve* iline,
45  const MGFace* face1,
46  MGCurve* param1,
47  const MGFace* face2,
48  MGCurve* param2
49 ):m_curve(iline),m_face1line(face1,param1),m_face2line(face2,param2){;};
50 
53 MGFFisect(
54  const MGCurve& iline,
55  const MGFace* face1,
56  const MGCurve& param1,
57  const MGFace* face2,
58  const MGCurve& param2
59 );
60 
62 MGFFisect(
63  MGCurve* iline,
64  MGFPline face1uv,
65  MGFPline face2uv
66 );
67 
70 MGFFisect(const MGFFisect& ffi);
71 
74 
76 
79 MGFFisect& operator= (const MGFFisect& ffi);
80 
82 bool operator< (const MGFFisect& ssi2)const;
83 bool operator> (const MGFFisect& ssi2)const{return ssi2<(*this);};
84 bool operator<= (const MGFFisect& ssi2)const{return !(ssi2<(*this));};
85 bool operator>= (const MGFFisect& ssi2)const{return !((*this)<ssi2);};
86 bool operator== (const MGFFisect& ssi2)const;
87 bool operator!= (const MGFFisect& ssi2)const{return !operator==(ssi2);};
88 
90 bool operator< (const MGisect& is)const;
91 bool operator< (const MGCCisect& is)const{return false;};
92 bool operator< (const MGCSisect& is)const{return false;};
93 bool operator< (const MGCFisect& is)const{return false;};
94 bool operator< (const MGSSisect& is)const{return false;};
95 bool operator== (const MGisect& is)const;
96 
98 
100 const MGObject& isect()const{return *m_curve;};
101 
103 const MGCurve* isect1_param1()const{return &(m_face1line.uvline());};
104 
106 const MGCurve* isect1_param2()const{return &(m_face2line.uvline());};
107 
112 int manifold_dimension()const{return 1;};
113 
115 std::ostream& out(std::ostream& ostrm)const;
116 
118 void exchange12();
119 
120 protected:
121 
123  const MGObject* object1(const MGObject* obj)const{
124  return m_face1line.face()->object_pointer();
125  };
126 
128  const MGObject* object2(const MGObject* obj)const{
129  return m_face2line.face()->object_pointer();
130  };
131 
132 private:
133 
135 
136  MGCurve* m_curve;
137  MGFPline m_face1line;
138  MGFPline m_face2line;
139 };
141  // end of IsectContainer group
143 #endif
virtual bool operator==(const MGisect &is) const =0
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
MGFFisect()
Void constructou. 初期化なしでDummy交線を生成
Definition: FFisect.h:38
MGFFisect(MGCurve *iline, const MGFace *face1, MGCurve *param1, const MGFace *face2, MGCurve *param2)
Definition: FFisect.h:43
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 MGFace * face()
Return MGFace pointer if this MGGel is an MGFace, else return null.
Definition: Gel.h:151
virtual bool operator<=(const MGisect &is) const
Definition: isect.h:41
const MGObject * object1(const MGObject *obj) const
Get the object1 pointer.
Definition: FFisect.h:123
virtual void exchange12()=0
Exchange 1st and 2nd order of the parameter line representation.
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
MGFace is a trimmed surface.
Definition: Face.h:51
Is an abstract class to provide unified interfaces to handle an intersection of two objects...
Definition: isect.h:26
MGSSisect represents one intersection line of two surfaces.
Definition: SSisect.h:29
One Intersection of curve and surface.
Definition: CSisect.h:26
const MGObject & isect() const
Return the object of the intersection(world coordinates representation).
Definition: FFisect.h:100
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
MGObject * object_pointer()
Return MGObject pointer if this MGGel is an MGObject, else return null.
Definition: Face.h:482
virtual bool operator!=(const MGisect &is) const
Definition: isect.h:44
Face's (u,v) parameter value line.
Definition: FPline.h:27
virtual std::ostream & out(std::ostream &ostrm) const =0
Output virtual function.
virtual bool operator<(const MGisect &is) const =0
Ordering functions.
const MGObject * object2(const MGObject *obj) const
Get the object2 pointer.
Definition: FFisect.h:128
const MGCurve * isect1_param2() const
Return the 2nd object's parameter value curve of the intersection.
Definition: FFisect.h:106
int manifold_dimension() const
Definition: FFisect.h:112
const MGCurve * isect1_param1() const
Return the 1st object's parameter value curve of the intersection.
Definition: FFisect.h:103