MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
LSPoint.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGLSPoint_HH_
6 #define _MGLSPoint_HH_
7 
12 #include "mg/Vector.h"
13 
14 //
15 //Define MGLSPoint Class.
16 
17 class MGEdge;
18 class MGPosition;
19 
21 
25 class MG_DLL_DECLR MGLSPoint{
26 
27 public:
28 
30 MG_DLL_DECLR friend std::ostream& operator<< (std::ostream&, const MGLSPoint& );
31 
33 MGLSPoint():m_pedge(0){;};
34 
37  const MGEdge* pedge,
38  double t,
39  double u,
40  double v
41 ):m_pedge(pedge), m_t(t),m_u(u), m_v(v){;};
42 
44 
46 bool operator< (const MGLSPoint& ls2)const;
47 bool operator> (const MGLSPoint& ls2)const{return ls2<(*this);};
48 bool operator<= (const MGLSPoint& ls2)const{return !(ls2<(*this));};
49 bool operator>= (const MGLSPoint& ls2)const{return !((*this)<ls2);};
50 bool operator== (const MGLSPoint& ls2)const;
51 bool operator!= (const MGLSPoint& ls2)const{return !operator==(ls2);};
52 
54 
56 const MGEdge* parameter_edge()const{return m_pedge;};
57 
59 double binder_param()const{return m_t;};
60 
62 void set_pedge(const MGEdge* pedge){ m_pedge=pedge;};
63 
65 void set_binder_param(double t){ m_t=t;};
66 
68 void set_surface_param(double u, double v){m_u=u; m_v=v;};
69 void set_surface_param(const MGPosition& uv);
70 
72 MGPosition surface_param()const;
73 void surface_param(double& u, double& v)const;
74 
76 MGVector world_point()const;
77 
78 private:
79  const MGEdge* m_pedge;
80  double m_t;
81  double m_u, m_v;
83 
84 };
85  // end of IsectContainer group
87 #endif
const MGEdge * parameter_edge() const
Return the binder edge pointer.
Definition: LSPoint.h:56
void set_pedge(const MGEdge *pedge)
Set binder edge pointer.
Definition: LSPoint.h:62
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
Vector of a general n space dimension.
Definition: Vector.h:26
MGLSPoint()
Definition: LSPoint.h:33
MGEdge is an instance of MGCellNB, represents a boundary element of 2D manifold.
Definition: Edge.h:33
Represent a positional data.
Definition: Position.h:28
void set_binder_param(double t)
Set binder edge pointer.
Definition: LSPoint.h:65
MGLSPoint is to express a loop and a surface intersection point.
Definition: LSPoint.h:25
void set_surface_param(double u, double v)
Set binder edge pointer.
Definition: LSPoint.h:68
double binder_param() const
Return binder edge's parameter data.
Definition: LSPoint.h:59
MGLSPoint(const MGEdge *pedge, double t, double u, double v)
Construct from all the necessary data.
Definition: LSPoint.h:36