MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
SBRepTP.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGSBRepTP_HH_
6 #define _MGSBRepTP_HH_
7 
8 #include <assert.h>
9 #include <memory>
10 #include "mg/LBRep.h"
11 
12 // MGSBRepTP.h
13 //
14 
15 class MGSurface;
16 class MGLBRep;
17 class MGOfstream;
18 class MGIfstream;
24 
28 class MG_DLL_DECLR MGSBRepTP{
29 
30 public:
31 
33 MG_DLL_DECLR friend std::ostream& operator<< (std::ostream&, const MGSBRepTP& );
34 
36 
38 MGSBRepTP();
39 
41 MGSBRepTP(const MGSBRepTP&);
42 
44 MGSBRepTP(const MGSurface& srf);
45 
47 
48 ~MGSBRepTP();
49 
51 
53 MGSBRepTP& operator=(const MGSBRepTP&);
54 
56 
61 double get_perimeters_max_cos(
62  const MGPvector<MGLBRep>& deris,
63  double taumax[4],
64  double cosmax[4]
65 )const;
66 
72 double get_perimeters_max_sin(
73  const MGSurface& srf,
74  double taumax[4],
75  double sinmax[4],
76  bool* eval=0
77 )const;
79 
82 double max_cos(
83  const MGCurve* perimeter[4]
84 )const;
85 
88 double max_cos(
89  const MGPvector<MGLBRep>& perimeters
90 )const;
91 
95 bool specified(int i) const{assert(i<4); return m_TP[i]!=0;};
96 
98 void set_TP_null(int i);
99 
101 void set_TP(int i, const MGLBRep& tp);
102 
104 void set_TP(int i, std::auto_ptr<MGLBRep>& tp);
105 
107 const MGLBRep& TP(int i) const{assert(i<4);return *(m_TP[i]);}
108 MGLBRep& TP(int i) {assert(i<4);return *(m_TP[i]);}
109 
110 MGLBRep** TP(){return m_TP;};
111 
112 private:
114  MGLBRep* m_TP[4];
115 
122 };
123 
134 MG_DLL_DECLR MGLBRep TP_from_world_curve(
135  const MGSurface& srf,
136  const MGCurve& wcrv,
137  int order,
138  int& error
139 );
140 
151 MG_DLL_DECLR MGLBRep TP_from_parameter_curve(
152  const MGSurface& srf,
153  const MGCurve& pcrv,
154  const MGCurve& wcrv,
155  int order,
156  int& error
157 );
158  // end of GEORelated group
160 
161 #endif
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
bool specified(int i) const
Definition: SBRepTP.h:95
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
MGLBRep ** TP()
Definition: SBRepTP.h:110
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
MGLBRep is a class for B-SPline representation.
Definition: LBRep.h:41
MGLBRep & TP(int i)
Definition: SBRepTP.h:108
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
const MGLBRep & TP(int i) const
Return i-th perimeter's TP.
Definition: SBRepTP.h:107
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
Defines Tangent Plane Line B-Representation Class.
Definition: SBRepTP.h:28