MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
Curve.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGCurve_HH_
6 #define _MGCurve_HH_
7 
8 #include <vector>
9 #include <memory>
10 #include "mg/MGCL.h"
11 #include "mg/Default.h"
12 #include "mg/Position.h"
13 #include "mg/Geometry.h"
14 #include "mg/FSurface.h"
15 #include "mg/Pvector.h"
16 #include "mg/KnotVector.h"
17 #include "mg/CCisect_list.h"
18 #include "mg/CSisect_list.h"
19 
20 //
21 //Define MGCurve Class.
22 
23 class MGInterval;
24 class MGBox;
25 class MGVector;
26 class MGUnit_vector;
27 class MGPosition_list;
28 class MGTransf;
29 class MGCParam_list;
30 class MGPoint;
31 class MGStraight;
32 class MGEllipse;
33 class MGLBRep;
34 class MGRLBRep;
35 class MGSurfCurve;
36 class MGBSumCurve;
37 class MGTrimmedCurve;
38 class MGCompositeCurve;
39 class MGSurface;
40 class MGPlane;
41 class MGSphere;
42 class MGCylinder;
43 class MGSBRep;
44 class MGRSBRep;
45 class MGBSumSurf;
46 class MGCCisect_list;
47 class MGCSisect_list;
48 class MGIfstream;
49 class MGOfstream;
50 class MGFace;
51 class MGShell;
52 class MGCFisect_vector;
53 class MGPPRep;
54 class MGCommonON;
55 class mgVBO;
62 class MG_DLL_DECLR MGCurve:public MGGeometry{
64 
65 public:
66 
68 
70 MGCurve();
71 
73 MGCurve(const MGCurve& curve);
74 
76 virtual ~MGCurve();
77 
79 
81 
84 virtual MGCurve& operator=(const MGCurve& gel2){MGGeometry::operator=(gel2);return *this;};
85 
87 
89 virtual MGCurve& operator+=(const MGVector& v)=0;
90 virtual MGCurve& operator-=(const MGVector& v)=0;
91 virtual MGCurve& operator*=(double scale)=0;
92 virtual MGCurve& operator*=(const MGMatrix& mat)=0;
93 virtual MGCurve& operator*=(const MGTransf& tr)=0;
94 
96 virtual bool operator==(const MGCompositeCurve& crv)const;
97 virtual bool operator==(const MGTrimmedCurve& crv)const;
98 virtual bool operator==(const MGGel& gel2)const=0;
99 virtual bool operator<(const MGGel& gel2)const=0;
100 
102 
104 
110 virtual void approximate_as_LBRep(
111  MGLBRep& lb,
112  int ordr=0,
113  int parameter_normalization=0,
120  bool neglectMulti=false
121 )const;
124 
126 
129 void arrow(double t,MGPosition data[4])const;
130 
132 virtual int bdim() const=0;
133 
135 
137 virtual MGBox box_limitted(
138  const MGInterval&
139 ) const = 0;
140 
145 virtual int calc_div_num(
146  const MGInterval& interval)
147 const{return this->offset_div_num(interval);};
149 
151 virtual MGPosition center() const;
152 
154 virtual MGPosition center_param() const;
155 
157 virtual MGCurve& change_dimension(
158  int sdim,
159  int start1=0,
160  int start2=0
161 )=0;
162 
164 
166 virtual void change_range(
167  double t1,
168  double t2
169 )=0;
170 
172 
174 virtual MGCurve* clone()const=0;
175 
177 virtual double closest(const MGPosition& point) const;
178 
180 virtual double closest2D(const MGPosition& point) const;
181 
183 
186 virtual MGPosition closest(const MGCurve& curve2) const;
187 
189 
192 bool cn_continuity(int n)const;
193 
195 
214 virtual int common(
215  const MGCurve& curve2,
216  std::vector<double>& vecComSpan,
217  MGCCisect_list& isect
218 ) const;
219 
221 
238 virtual int common(
239  const MGCurve& curve2,
240  std::vector<double>& vecComSpan
241 ) const;
242 
244 
246 virtual MGCurve& coordinate_exchange(int i, int j)=0;
247 
249 
254 virtual MGCurve* copy_as_nurbs() const=0;
255 
257 
260 virtual void convert_to_Bezier(MGLBRep& bezier)const;
261 
263 
267  int sdim,
268  int start1=0,
269  int start2=0
270 )const=0;
271 
273 
277 virtual MGCurve* copy_limitted(const MGInterval& prange) const;
278 
280 
284 virtual double curvature( double ) const;
285 
287 MGCurve* curve(){return this;};
288 const MGCurve* curve()const{return this;};
289 
291 
298 virtual double curvilinear_integral(double t1, double t2) const;
299 virtual double curvilinear_integral() const{
300  return curvilinear_integral(param_s(), param_e());
301 };
302 
304 virtual double deriv_length()const;
305 
307 MGUnit_vector direction(const MGPosition& param) const;
308 
310 
312 virtual MGUnit_vector direction(double) const;
313 
315 virtual void display_arrows(mgSysGL& sgl)const;
316 virtual void display_break_points(mgSysGL& sgl)const;
317 virtual void display_curvatures(
318  mgSysGL& sgl,
319  double scale,
320  int density,
321  bool use_radius
322 )const;
323 
325 
327 virtual int divide_multi(
328  MGPvector<MGCurve>& crv_list,
329  int multiplicity=-1
330 )const;
333 
335 int divide_number() const{return offset_div_num(param_range());};
336 
338 virtual void drawSE(
339  mgVBO& vbo,
340  double span_length,
341  double t0,
342  double t1
343 )const;
345 
347 virtual void drawWire(
348  mgVBO& vbo,
349  double span_length,
350  int line_density=1
351 )const{drawSE(vbo,span_length,param_s(),param_e());};
352 
354 virtual MGPosition end_point() const;
355 
357 
359 virtual MGVector eval(
360  double,
361  int nderiv=0,
362  int left=0
363 ) const = 0;
365 
367 
369 virtual void eval_all(
370  double,
371  MGPosition&,
372  MGVector&,
373  MGVector&
374 ) const;
375 
377 
379 virtual MGVector eval_deriv(double) const;
380 
382 
390 void eval_discrete_deviation(
391  const MGCurve& curve2,
392  std::vector<MGPosition>& sts,
393  int npoint=20,
395  double tolerance=0.1
396 )const;
397 
399 virtual void eval_line(
400  const MGNDDArray& tau,
401  MGBPointSeq& value
402 )const;
403 
405 
407 virtual MGPosition eval_position(double) const;
408 
411  const MGPosition& t,
412  const int* nderiv=0
414 ) const;
417 
419 
421 virtual void extend(
422  double length,
423  bool start=false
424 )=0;
426 
428 virtual void Frenet_frame2(
429  double t,
430  MGVector& V2,
431  MGVector& T,
432  MGVector& N,
433  MGVector& B
434 )const;
435 
437 virtual void Frenet_frame(
438  double t,
439  MGUnit_vector& T,
440  MGUnit_vector& N,
441  MGUnit_vector& B,
442  double& curvature,
443  double& torsion
444 )const;
445 
447 
449 double get_average_tangent_length()const;
450 
452 
455 virtual bool get_control_points(
456  MGBPointSeq& cpoints
457 )const{return false;};
458 
462 void getParamsC0Continuity(std::vector<double>& param)const;
463 
465 
469 bool has_same_direction_at(
470  double s,
471  const MGCurve& curve2,
472  double t
473 )const;
474 
476 virtual long identify_type() const=0;
477 
479 virtual bool in_range(double t) const;
480 
482 bool in_range(const MGPosition& t) const;
483 
485 
487 MGCCisect_list intersect_brute_force(const MGCurve&) const;
488 
490 
494 virtual MGCCisect_list intersect(const MGCurve&) const;
495 
497 
506 MGisects intersection(const MGObject& obj2)const;
507 MGisects intersection(const MGCurve& obj2)const;
508 MGisects intersection(const MGFSurface& obj2)const;
509 MGisects intersection(const MGSurface& obj2)const;
510 MGisects intersection(const MGFace& obj2)const;
511 MGisects intersection(const MGShell& obj2)const;
512 
514 virtual int intersect_dnum()const=0;
515 
517 MGCSisect_list intersect_with_plane(const MGPlane& surf)const;
518 
520 virtual MGCCisect_list isect(const MGCurve& curve2)const=0;
521 virtual MGCCisect_list isect(const MGStraight& curve2)const=0;
522 virtual MGCCisect_list isect(const MGRLBRep& curve2)const;
523 virtual MGCCisect_list isect(const MGEllipse& curve2)const;
524 virtual MGCCisect_list isect(const MGLBRep& curve2)const;
525 virtual MGCCisect_list isect(const MGSurfCurve& curve2)const=0;
526 virtual MGCCisect_list isect(const MGBSumCurve& curve2)const;
527 MGCCisect_list isect(const MGTrimmedCurve& curve2)const;
528 MGCCisect_list isect(const MGCompositeCurve& curve2)const;
529 
530 virtual MGCSisect_list isect(const MGSurface& surf)const=0;
531 virtual MGCSisect_list isect(const MGPlane& surf)const=0;
532 virtual MGCSisect_list isect(const MGSphere& surf)const=0;
533 virtual MGCSisect_list isect(const MGCylinder& surf)const=0;
534 virtual MGCSisect_list isect(const MGSBRep& surf)const=0;
535 virtual MGCSisect_list isect(const MGRSBRep& surf)const=0;
536 virtual MGCSisect_list isect(const MGBSumSurf& surf)const=0;
537 
538 MGCSisect_list isect(const MGFSurface& fs)const{return fs.isect(*this);};
539 virtual MGCSisect_list isect(const MGFace&)const;
540 
542 MGCFisect_vector isect(const MGShell& shl) const;
543 
545 
547 MGCParam_list isect_1D(
548  double f,
549  int coordinate=0
550 ) const;
551 
553 
564 virtual const MGLBRep* is_Bezier(int ordr=0)const;
565 
567 
569 bool is_closed()const{return start_point()==end_point();};
570 
572 bool is_closedWithError(double err)const;
573 
575 
578 virtual bool is_coplanar(const MGCurve& curve2, MGPlane& plane)const;
579 
581 virtual bool is_startpoint_parameter(double t)const;
582 
584 virtual bool is_endpoint_parameter(double t)const;
585 
587 
589 bool is_perpendicular(const MGPosition& P, double t)const;
590 
592 
595 virtual bool is_linear(MGStraight& straight)const;
596 
598 
601 virtual bool is_planar(MGPlane& plane)const;
602 
604 virtual double knot(int i) const=0;
605 
607 virtual const MGKnotVector& knot_vector() const=0;
608 
610 MGKnotVector& knot_vector();
611 
613 
617 virtual double length(double t1, double t2) const;
618 
620 
624 virtual double length() const {return length(param_s(), param_e());}
625 
627 
631 virtual double length_param( double t, double len) const;
632 
634 
636 virtual MGCurve& limit(const MGInterval& rng) = 0;
637 MGCurve& limit(double t0, double t1);
638 
640 int manifold_dimension() const{ return 1;};
641 
643 virtual void negate() = 0;
644 
646 virtual double negate_param(double t)const= 0;
647 
652 void negate_transform(MGGeometry& boundary)const;
653 
655 
663 virtual MGPvector<MGCurve> offset(
664  double ofs_value,
665  const MGVector& norm_vector = mgNULL_VEC
666 ) const;
667 
669 
678 virtual MGPvector<MGCurve> offset(
679  const MGLBRep& ofs_value_lb,
680  const MGVector& norm_vector = mgNULL_VEC
681 ) const;
682 
684 
692 virtual MGLBRep offset_c2(
693  double ofs_value,
694  const MGVector& norm_vector = mgNULL_VEC
695 ) const;
696 
698 
707 virtual MGLBRep offset_c2(
708  const MGLBRep& ofs_value_lb,
709  const MGVector& norm_vector = mgNULL_VEC
710 ) const;
711 
715 virtual int offset_div_num(
716  const MGInterval& interval
717 )const;
719 
721 
728 virtual bool on(
729  const MGPosition& point,
730  double& t
731 ) const;
732 
734 
741 bool on(
742  const MGPosition& P,
743  MGPosition& t
744 ) const;
745 
747 virtual int order() const=0;
748 
750 
754 virtual double param(
755  const MGPosition &
756 ) const;
757 
759 virtual double param_e() const=0;
760 
762 virtual double param_error() const;
763 
765 virtual double param_normalize(double t) const=0;
766 
768 virtual MGInterval param_range() const;
769 
771 double param_round_into_range(double t)const;
772 
774 MGBox parameter_range() const;
775 
777 virtual double param_s() const=0;
778 
780 double param_se(double t) const;
781 
783 virtual double param_span() const{return param_e()-param_s();};
784 
786 
789 virtual MGCurve* part(
790  double t1,
791  double t2,
792  int multiple=0
793 ) const=0;
795 
797 
802 virtual int perp_guess(
803  double t0,
804  double t1,
805  const MGPosition& P,
806  double tg,
807  double& t
808 ) const;
809 
811 
816 virtual int perp_guess(
817  double s0,
818  double s1,
819  const MGCurve& curve2,
820  double t0,
821  double t1,
822  double sg,
823  double tg,
824  MGPosition& st
825 ) const;
828 
830 
834 virtual int perp_point(
835  const MGPosition& p,
836  double& t,
837  const double* g=0
838 ) const;
839 
841 
856 MGPosition_list perpendiculars(
857  const MGCurve& crv
858 ) const;
859 
861 
864 virtual MGCParam_list perps(
865  const MGPosition& P
866 ) const;
867 
869 
876 virtual MGPosition_list perps(const MGCurve& crv2)const=0;
877 virtual MGPosition_list perps(const MGStraight& crv2)const=0;
878 virtual MGPosition_list perps(const MGRLBRep& crv2)const;
879 virtual MGPosition_list perps(const MGEllipse& crv2)const;
880 virtual MGPosition_list perps(const MGLBRep& crv2)const;
881 virtual MGPosition_list perps(const MGSurfCurve& crv2)const;
882 virtual MGPosition_list perps(const MGBSumCurve& crv2)const;
883 MGPosition_list perps(const MGCompositeCurve& crv2)const;
884 MGPosition_list perps(const MGTrimmedCurve& crv2)const;
885 
887 
890 virtual MGPosition pick_closest(const MGStraight& sl)const;
891 
893 
895 virtual void polygonize(
896  double error,
897  MGLBRep& lb2
898 )const;
899 
900 
902 
903 //曲線を面に面直またはベクトル投影して曲線リストを求める。
910 //戻り値:
926 virtual int project(
927  const MGFSurface& surf, //given surface.
928  MGPvector<MGCurve>& vec_crv_uv, //uv projection curve will be appended.
929  MGPvector<MGCurve>& vec_crv, //3d projection curve will be appended.
930  const MGVector& vec //projection vector.
931  //if vec = NULL then calculate perpendicular project.
932 )const;
933 
935 
937 virtual double range(double t) const;
938 
940 
943 MGPosition range(const MGPosition& t) const;
944 
946 std::auto_ptr<MGCurve> rebuild(
947  int how_rebuild=1,
955  int parameter_normalization=2,
962  double tol=-1.,
963  int ordr=0,
965  const double* param_range=0
970 )const;
971 
973 
978 virtual void remove_knot();
979 
981 
983 virtual MGCurve& rotate_self(
984  const MGVector& v,
985  double,
986  const MGPosition & = mgORIGIN
987 );
988 
990 
997 std::auto_ptr<MGLBRep> scalePolar(
998  double angleBase,
999  double angle1,
1000  double angle2
1001 )const;
1002 
1004 virtual int sdim() const =0 ;
1005 
1007 virtual MGPosition start_point() const;
1008 
1010 
1015 virtual MGSurface* sweep(
1016  const MGUnit_vector& uvec,
1017  double start_dist,
1018  double end_dist
1019 ) const =0;
1020 
1022 
1024 virtual int tangent_guess(
1025  double t0,
1026  double t1,
1027  const MGPosition& P,
1028  double tg,
1029  double& t
1030 )const;
1031 
1033 
1036 void trim_end(double t);
1037 
1039 
1042 void trim_start(double t);
1043 
1045 
1048 void trim_start_and_end(double ts, double te);
1049 
1051 virtual MGCURVE_TYPE type() const =0;
1052 
1054 virtual MGCurve& unlimit() =0;
1055 
1057 
1059 virtual MGCurve& unlimit_end() =0;
1060 
1062 
1064 virtual MGCurve& unlimit_start() =0;
1065 
1067 
1073 virtual std::auto_ptr<MGLBRep> PolarCoordinatesLBRep()const;
1074 
1076 virtual std::ostream& out(std::ostream&) const;
1077 
1078 virtual std::string whoami()const{return "Curve";};
1079 
1080 protected:
1081 
1083 
1085 virtual void ReadMembers(MGIfstream& buf);
1086 
1088 
1090 virtual void WriteMembers(MGOfstream& buf) const;
1091 
1093 
1095 virtual MGCParam_list intersect_1D(
1096  double f,
1097  int coordinate=0
1098 ) const;
1099 
1101 
1103 void approximate_as_LBRep2(
1104  MGLBRep& lb,
1105  int order,
1106  int is,
1107  int ie,
1108  bool neglectMulti=false
1109 )const;
1112 
1114 virtual void data_points_for_approximate_as_LBRep2(
1115  int is,
1116  int ie,
1117  MGKnotVector& t,
1118  MGNDDArray& tau,
1120  bool neglectMulti=false
1121 )const;
1124 
1126 void extrapolated_pp(
1127  double tau,
1128  double dk,
1131  MGPPRep& pp
1132 )const;
1133 
1135 virtual MGCCisect_list isect_withC1LB(const MGLBRep& curve2)const;
1136 
1138 virtual MGCCisect_list isect_with_noCompoSC(const MGSurfCurve& curve2)const;
1139 
1141 
1146 virtual std::auto_ptr<MGCurve> oneD(
1147  const double g[4]
1148 ) const=0;
1149 
1151 
1154 virtual MGPosition_list perps_withC1LB(
1155  const MGLBRep& lbC1
1156 )const;
1157 
1159 
1162 virtual MGPosition_list perps_with_noCompoSC(const MGSurfCurve& curve2)const;
1163 
1165 
1168 MGPosition_list perpsSl(
1169  const MGStraight& sl
1170 )const;
1171 
1174 
1175 private:
1176 
1182 int common_one_span(
1183  const MGCurve& curve2,
1184  MGCommonON SEon[2],
1185  MGCommonON &sparam,
1186  double span,
1189  double comSpan[4]
1190 )const;
1191 
1196 void common_boundary(
1197  const MGCurve& curve2,
1198  const MGCommonON& onparam,
1199  const MGCommonON& offparam,
1200  double& param1, double& param2
1201 )const;
1202 
1205 virtual MGBox* compute_box() const=0;
1206 
1208 int offset_norm_proc(
1209  const MGLBRep& ofs_value_lb,
1210  const MGVector& norm_vector,
1211  MGPvector<MGCurve>& ofs_crvl
1212 )const;
1213 
1215 int offset_proc(
1216  const MGLBRep& ofs_value_lb,
1217  MGPvector<MGCurve>& ofs_crvl
1218 )const;
1219 
1221 int offset_norm_c2_proc(
1222  const MGLBRep& ofs_value_lb,
1223  const MGVector& norm_vector,
1224  MGLBRep& ofs_brep
1225 )const;
1226 
1228 int offset_c2_proc(
1229  const MGLBRep& ofs_value_lb,
1230  MGLBRep& ofs_brep,
1231  MGUnit_vector& preN,
1232  int& freverse
1233 )const;
1234 
1236 int divide_multi_ofs(
1237  const MGLBRep& ofs_value_lb,
1238  MGPvector<MGCurve>& brep_list
1239 )const;
1240 
1244 
1247 MGKnotVector offset_make_knotvector(const MGLBRep& ofs_value_lb)const;
1248 
1249 friend class MGFace;
1250 friend class MGFSurface;
1251 friend class MGSurface;
1252 friend class MGLBRep;
1253 friend class MGTrimmedCurve;
1254 friend class MGSurfCurve;
1255 friend class MGCompositeCurve;
1256 friend class MGBSumCurve;
1257 
1258 };
1259 
1262 class MGCurveLengthDrive{
1263  const MGCurve* m_curve;
1264 public:
1265  MGCurveLengthDrive(const MGCurve* curve):m_curve(curve){;};
1266 
1268  double operator()(double t) const;
1269 };
1270 
1272 class MGCurveLenParamDrive {
1273  const MGCurve* m_curve;
1274  double m_len, m_ts;
1275 public:
1276  MGCurveLenParamDrive(const MGCurve* curve, double len, double ts)
1277  :m_curve(curve), m_len(len), m_ts(ts){;};
1278  double operator()(double t)const;
1279 };
1281 
1282 namespace MGCL{
1283 
1285 extern double Curvature(
1286  const MGVector& v1,
1287  const MGVector& v2
1288 );
1289 
1291 extern double Torsion(
1292  const MGVector& v1,
1293  const MGVector& v2,
1294  const MGVector& v3
1295 );
1296 
1298 void one_arrow(
1299  const MGPosition& root,
1300  const MGVector& vecx,
1301  const MGUnit_vector& vecy,
1302  MGPosition& head,
1303  MGPosition& headtail1,
1304  MGPosition& headtail2
1305 );
1306 
1310 MG_DLL_DECLR MGRLBRep* convert_to_rational(const MGCurve& curve);
1311 
1312 }
1313  // end of GEO group
1315 #endif
virtual MGGeometry & operator=(const MGGeometry &gel2)
Definition: Geometry.h:56
virtual MGCurve & operator=(const MGCurve &gel2)
Assignment.
Definition: Curve.h:84
const MGCurve * curve() const
Definition: Curve.h:288
MGTrimmedCurve is a part of an original curve of a limitted parameter range.
Definition: TrimmedCurve.h:50
Defines PP-Represetation of a spline.
Definition: PPRep.h:32
virtual void negate()
Negate direction of this geometry.
Definition: Geometry.h:120
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
double Torsion(const MGVector &v1, const MGVector &v2, const MGVector &v3)
Compute torsion.
virtual void update_mark()
Mark this as updated.
Definition: Geometry.h:156
MGPlane is infinite plane in 3D space.
Definition: Plane.h:38
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
MGCylinder is a Cylinder in 3D space.
Definition: Cylinder.h:37
double Curvature(const MGVector &v1, const MGVector &v2)
Compute curvature in 3D space, ie, the value is not negative.
virtual std::ostream & out(std::ostream &) const
Output virtual function.
virtual double param_span() const
Compute parameter span length.
Definition: Curve.h:783
virtual int sdim() const =0
Return space dimension.
virtual MGisects intersection(const MGObject &obj2) const =0
virtual bool operator<(const MGGel &gel2) const
virtual long identify_type() const =0
Return This object's typeID.
MGPoint represents one dimensional manifold, a point in a space.
Definition: Point.h:28
virtual void display_curvatures(mgSysGL &sgl, double scale, int density, bool use_radius) const
Definition: Gel.h:195
MGCompositeCurve is a composite of other leaf curves.
Definition: CompositeCurve.h:39
void one_arrow(const MGPosition &root, const MGVector &vecx, const MGUnit_vector &vecy, MGPosition &head, MGPosition &headtail1, MGPosition &headtail2)
Generate arrow data from (root, vecx, vecy).
virtual void update_mark()
Mark this as updated.
Definition: Curve.h:1173
bool is_closed() const
Test if this is a closed curve.
Definition: Curve.h:569
int divide_number() const
get the a divide number for offset, intersection, or others.
Definition: Curve.h:335
MGCFisect_vector defines a vector of MGCFisect.
Definition: CFisect_vector.h:25
virtual MGGeometry * copy_change_dimension(int sdim, int start1=0, int start2=0) const =0
virtual MGBox * compute_box() const =0
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual void negate_transform(MGGeometry &boundary) const =0
virtual MGPosition center() const =0
Obtain ceter coordinate of the geometry.
MGLBRep is a class for B-SPline representation.
Definition: LBRep.h:41
virtual std::string whoami() const
Definition: Curve.h:1078
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
virtual MGUnit_vector direction(const MGPosition &param) const
Compute direction unit vector of the geometry.
MGShell is a composition of MGFace's(trimmed surface).
Definition: Shell.h:32
Vector of a general n space dimension.
Definition: Vector.h:26
MGGeometry is an abstract class which represents a whole geometry.
Definition: Geometry.h:36
MG_DLL_DECLR MGRLBRep * convert_to_rational(const MGCurve &curve)
Creates a curve that has weight.
Defines a Box of any space dimendion.
Definition: Box.h:34
Define MGBSumCurve Class(Boolean sum curve of three curves).
Definition: BSumCurve.h:28
virtual void ReadMembers(MGIfstream &buf)
MGFace is a trimmed surface.
Definition: Face.h:51
virtual void display_break_points(mgSysGL &sgl) const
Definition: Gel.h:193
virtual MGPosition pick_closest(const MGStraight &sl) const
Definition: Object.h:146
virtual void WriteMembers(MGOfstream &buf) const
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
MGStraight is a curve of any space dimension, represent a straight line.
Definition: Straight.h:49
Interval of 1 dimension, i.e. MGInterval is a real line.
Definition: Interval.h:22
Represent a positional data.
Definition: Position.h:28
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
MGCurve * curve()
Return curve pointer if this MGGel is an MGCurve, else return null.
Definition: Curve.h:287
MGCSisect_list defines linked list of MGCSisect.
Definition: CSisect_list.h:22
Defines Knot vector of B-Representation.
Definition: KnotVector.h:28
Defines Boolean sum surface.
Definition: BSumSurf.h:26
virtual bool in_range(const MGPosition &t) const
Definition: Geometry.h:114
virtual MGObject & operator-=(const MGVector &v)=0
virtual MGGeometry & change_dimension(int sdim, int start1=0, int start2=0)=0
Changing this object's space dimension.
Defines BPoint seq of a space dimension and of a capacity.
Definition: BPointSeq.h:38
MGParam_Vector provides a list to store parameters of a curve.
Definition: CParam_list.h:18
Definition: Curve.h:1282
MGSphere is a Sphere in 3D space.
Definition: Sphere.h:42
Defines a list of MGCCisect(curve to curve intersection).
Definition: CCisect_list.h:20
MGCSisect_list isect(const MGFSurface &fs) const
Definition: Curve.h:538
MGFSurface is an abstract class to provide the comman interfaces to MGFace and MGSurface.
Definition: FSurface.h:33
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
Defines Rational Line B-Representation.
Definition: RLBRep.h:32
MGCURVE_TYPE
Curve type(曲線の種類).
Definition: MGCL.h:143
MGPosition_list provides a list of Positions.
Definition: Position_list.h:27
virtual double length() const
Compute whole curve length.
Definition: Curve.h:624
virtual MGBox parameter_range() const =0
virtual MGVector evaluate(const MGPosition &t, const int *nderiv=0) const =0
Evaluate n'th derivative data. n=0 means positional data evaluation.
Defines Surface B-Representation of rational form.
Definition: RSBRep.h:38
virtual bool get_control_points(MGBPointSeq &cpoints) const
Extracts control points.
Definition: Curve.h:455
virtual MGGeometry * clone() const =0
Defines non-decreasing double data array.
Definition: NDDArray.h:27
Defines Surface B-Representation, that is , B-Spline surface.
Definition: SBRep.h:48
MGEllipse is a class to define an ellipse of 2D or 3D.
Definition: Ellipse.h:38
virtual void drawWire(mgVBO &vbo, double span_length, int line_density=1) const
Draw this curve into vbo, approximating with polyline.
Definition: Curve.h:347
int manifold_dimension() const
Return manifold dimension, 0:point, 1:curve, 2:surface.
Definition: Curve.h:640
MGisects defines a vector of MGisect.
Definition: isects.h:44
virtual double curvilinear_integral() const
Definition: Curve.h:299
virtual MGObject & operator+=(const MGVector &v)=0
Object transformation.
virtual MGObject & operator*=(double scale)=0
virtual bool operator==(const MGGel &gel2) const
Comparison.
Definition: Gel.h:80
virtual MGHHisect_vector isect(const MGShell &shell2) const =0
Intersection.
virtual MGPosition center_param() const =0
Obtain ceter parameter value of the geometry.
mgSysGL is a class to provide a facility to draw temporal pictures.
Definition: sysGL.h:26
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
Define a unit vector, is a MGVector.
Definition: Unit_vector.h:17
MGSurfCurve is a curve on a surface.
Definition: SurfCurve.h:43
virtual void display_arrows(mgSysGL &sgl) const
Definition: Gel.h:192
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30