MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
CSisect.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGCSisect_HH_
6 #define _MGCSisect_HH_
7 
11 #include "mg/MGCL.h"
12 #include "mg/isect.h"
13 #include "mg/Point.h"
14 
15 // MGCSisect.h
16 // Header for MGCSisect
17 
18 //Forward declaration.
19 class MGInterval;
20 class MGPosition;
21 
23 
26 class MG_DLL_DECLR MGCSisect:public MGisect{
27 
28 public:
29 
31 
33 MGCSisect ();
34 
36 MGCSisect(
37  const MGPosition& point,
38  double t,
39  const MGPosition& uv,
41 );
42 
44 
45 bool operator< (const MGCSisect& csi)const;
46 bool operator> (const MGCSisect& csi)const{return csi<(*this);};
47 bool operator<= (const MGCSisect& csi)const{return !(csi<(*this));};
48 bool operator>= (const MGCSisect& csi)const{return !((*this)<csi);};
49 bool operator== (const MGCSisect& csi)const;
50 bool operator!= (const MGCSisect& csi)const{return !operator==(csi);};
51 
53 bool operator< (const MGisect& is)const;
54 bool operator< (const MGCCisect& is)const{return false;};
55 bool operator< (const MGCFisect& is)const{return true;};
56 bool operator< (const MGSSisect& is)const{return true;};
57 bool operator< (const MGFFisect& is)const{return true;};
58 bool operator== (const MGisect& is)const;
59 
61 
63 void distance(
64  const MGCSisect& isect2,
65  double& t,
66  double& u,
67  double& v
68 )const;
69 
72 double distance_square(const MGCSisect& isect2)const;
73 
75 void exchange12(){;};
76 
78 const MGObject& isect()const{return m_ipoint;};
79 
81 MGPosition isect0_param1()const{return MGPosition(1,&m_t);};
82 
84 MGPosition isect0_param2()const{return m_uv;};
85 
90 int manifold_dimension()const{return 0;};
91 
93 std::ostream& out(std::ostream& ostrm)const;
94 
97 double param_curve() const{return m_t;};
98 
101 const MGPosition& param_surface() const{return m_uv;};
102 
104 const MGPosition& point() const{return m_ipoint.position();};
105 
108 MGCSRELATION rel() const{return m_rel;};
109 
110 private:
112 
113  MGPoint m_ipoint;
114  double m_t;
115  MGPosition m_uv;
117  MGCSRELATION m_rel;
119 
121 };
122  // end of IsectContainer group
124 #endif
MGPosition isect0_param2() const
Return the 2nd object's parameter value of the intersection.
Definition: CSisect.h:84
virtual bool operator==(const MGisect &is) const =0
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
MGPoint represents one dimensional manifold, a point in a space.
Definition: Point.h:28
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
MGCSRELATION rel() const
Definition: CSisect.h:108
virtual bool operator>(const MGisect &is) const
Definition: isect.h:40
const MGPosition & param_surface() const
Definition: CSisect.h:101
Is an abstract class to provide unified interfaces to handle an intersection of two objects...
Definition: isect.h:26
Interval of 1 dimension, i.e. MGInterval is a real line.
Definition: Interval.h:22
MGSSisect represents one intersection line of two surfaces.
Definition: SSisect.h:29
One Intersection of curve and surface.
Definition: CSisect.h:26
const MGPosition & point() const
Return coordinate values(交点の座標値を返却する)
Definition: CSisect.h:104
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 bool operator>=(const MGisect &is) const
Definition: isect.h:42
MGPosition isect0_param1() const
Return the 1st object's parameter value of the intersection.
Definition: CSisect.h:81
Unknown. 未知
Definition: MGCL.h:201
virtual bool operator!=(const MGisect &is) const
Definition: isect.h:44
int manifold_dimension() const
Definition: CSisect.h:90
virtual std::ostream & out(std::ostream &ostrm) const =0
Output virtual function.
virtual bool operator<(const MGisect &is) const =0
Ordering functions.
double param_curve() const
Definition: CSisect.h:97
void exchange12()
Exchange 1st and 2nd order of the parameter line representation.
Definition: CSisect.h:75
const MGObject & isect() const
Return the object of the intersection(world coordinates representation).
Definition: CSisect.h:78
MGCSRELATION
Relation of curve and surface(曲線と曲面の交点の関係).
Definition: MGCL.h:200