MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
isect.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGisect_HH_
6 #define _MGisect_HH_
7 
14 #include <iostream>
15 #include "mg/MGCL.h"
16 #include "mg/Position.h"
17 class MGObject;
18 class MGCurve;
19 class MGCCisect;
20 class MGCSisect;
21 class MGCFisect;
22 class MGSSisect;
23 class MGFFisect;
24 
26 class MG_DLL_DECLR MGisect{
27 friend class MGisects;
28 
29 public:
30 
32 
34 virtual ~MGisect(){;};
35 
37 
39 virtual bool operator< (const MGisect& is)const=0;
40 virtual bool operator> (const MGisect& is)const{return is<(*this);};
41 virtual bool operator<= (const MGisect& is)const{return !(is<(*this));};
42 virtual bool operator>= (const MGisect& is)const{return !((*this)<is);};
43 virtual bool operator== (const MGisect& is)const=0;
44 virtual bool operator!= (const MGisect& is)const{return !operator==(is);};
45 virtual bool operator< (const MGCCisect& is)const=0;
46 virtual bool operator< (const MGCSisect& is)const=0;
47 virtual bool operator< (const MGCFisect& is)const=0;
48 virtual bool operator< (const MGSSisect& is)const=0;
49 virtual bool operator< (const MGFFisect& is)const=0;
50 
52 
54 virtual void exchange12()=0;
55 
57 virtual const MGObject& isect()const=0;
58 
61 virtual MGPosition isect0_param1()const{return MGPosition();};
62 
65 virtual MGPosition isect0_param2()const{return MGPosition();};
66 
69 virtual const MGCurve* isect1_param1()const{return 0;};
70 
73 virtual const MGCurve* isect1_param2()const{return 0;};
74 
79 virtual int manifold_dimension()const=0;
80 
82 virtual std::ostream& out(std::ostream& ostrm)const=0;
83 
84 private:
85 
87  virtual const MGObject* object1(const MGObject* obj)const{return obj;};
88 
90  virtual const MGObject* object2(const MGObject* obj)const{return obj;};
91 
92 };
93 
95 inline std::ostream& operator<< (std::ostream& ostrm, const MGisect& is){
96  is.out(ostrm);
97  return ostrm;
98 }
99  // end of IsectContainer group
101 #endif
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
const MGObject * object1(int i) const
virtual ~MGisect()
Definition: isect.h:34
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 MGPosition isect0_param2() const
Definition: isect.h:65
const MGObject * object2(int i) const
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
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
Represent a positional data.
Definition: Position.h:28
MGCFisect is to represent an intersection of a face and a curve.
Definition: CFisect.h:24
virtual const MGCurve * isect1_param2() const
Definition: isect.h:73
virtual std::ostream & out(std::ostream &ostrm) const =0
Output virtual function.
virtual const MGCurve * isect1_param1() const
Definition: isect.h:69
MGisects defines a vector of MGisect.
Definition: isects.h:44
virtual MGPosition isect0_param1() const
Definition: isect.h:61
void exchange12()
Exchange first and second order of MGisect.