9 #include "mg/Position.h"
10 #include "mg/Unit_vector.h"
123 bool whole_circle=
false
144 bool whole_circle=
false
170 bool whole_circle=
false
179 bool whole_circle=
false
188 bool whole_circle=
false
347 void change_param_to_radian();
358 bool circle()
const {
return m_circle!=0;};
458 return eval_in_radian2(gp_to_radian(t));
471 if(param_range_is_in_radian())
473 return m_prange[0]+(t-m_gprange[0])*m_gprange[2];
482 bool in_RelativeRange_of_radian(
double t)
const;
518 bool is_whole_ellipse()
const;
522 double knot(
int i)
const;
556 double length(
double t1,
double t2)
const;
599 if(m_gprange)
return m_gprange[1];
600 else return m_prange[1];
609 if(m_gprange)
return m_gprange[0];
610 else return m_prange[0];
657 if(!m_gprange)
return angle;
658 return m_gprange[0]+(angle-m_prange[0])/m_gprange[2];
692 std::ostream&
out(std::ostream& ostrm)
const;
697 int SubordinateEntitySwitch=0
713 std::auto_ptr<MGCurve>
oneD(
723 std::string
whoami()
const{
return "Ellipse";};
750 MGBox* compute_box()
const;
762 void copy_ellipse_data(
const MGEllipse& ellipse2);
767 bool in_radian_range(
double angle)
const;
790 double param_length(
double p1,
double p2)
const;
795 double RelativeRange_in_radian(
double angle)
const;
805 void set_normal_r_c();
virtual MGCurve & operator=(const MGCurve &gel2)
Assignment.
Definition: Curve.h:84
virtual MGCurve & unlimit_start()=0
Unlimit parameter range of the curve to the start point direction.
virtual long identify_type() const =0
Return This object's typeID.
virtual MGCurve & unlimit()=0
Unlimit parameter range of the curve(limitをはずす).
int bdim() const
Returns B-Rep Dimension.
Definition: Ellipse.h:329
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
const MGVector & minor_axis() const
Return minor axis:短軸を返却する
Definition: Ellipse.h:575
MGPlane is infinite plane in 3D space.
Definition: Plane.h:38
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
virtual MGCurve * copy_change_dimension(int sdim, int start1=0, int start2=0) const =0
Construct new curve object by changing the original object's space dimension.
MGCylinder is a Cylinder in 3D space.
Definition: Cylinder.h:37
const double mgDBLPAI
2.0 * π 値の設定
Definition: MGCL.h:101
virtual int out_to_IGES(MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
Definition: Gel.h:93
virtual MGCParam_list perps(const MGPosition &P) const
Compute all foot points of the perpendicular line from point to the curve.
virtual double length_param(double t, double len) const
Inverse function of length.
MGPosition center() const
Return the center of the ellipse:楕円の中心座標を返却する。
Definition: Ellipse.h:337
virtual void negate()=0
Negate the curve direction(曲線の方向を反転する).
virtual double negate_param(double t) const =0
Obtain the parameter value to t when this curve is negated by "negate()".
virtual void drawSE(mgVBO &vbo, double span_length, double t0, double t1) const
Draw this curve into vbo, approximating with polyline.
bool circle() const
Definition: Ellipse.h:358
const MGVector & major_axis() const
Return major axis:長軸を返却する。
Definition: Ellipse.h:569
virtual MGCurve & operator+=(const MGVector &v)=0
Object transformation.
virtual MGCurve * clone() const =0
Construct new geometry object by copying to newed area.
virtual MGCurve & coordinate_exchange(int i, int j)=0
Exchange ordering of the coordinates.
double radian_to_gp(double angle) const
Compute general parameter t from the radian parameter angle.
Definition: Ellipse.h:656
virtual void eval_all(double, MGPosition &, MGVector &, MGVector &) const
Compute position, 1st and 2nd derivatives.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual int sdim() const =0
Return space dimension.
MGPosition eval_position(double t) const
Definition: Ellipse.h:456
MGLBRep is a class for B-SPline representation.
Definition: LBRep.h:41
MGIgesDirectoryEntry describes a directory entry section of an IGES file.
Definition: IgesDirectoryEntry.h:20
int order() const
Returns the order.
Definition: Ellipse.h:595
Vector of a general n space dimension.
Definition: Vector.h:26
std::string whoami() const
Definition: Ellipse.h:723
double gp_to_radian(double t) const
Compute the radian parameter of the general parameter t;.
Definition: Ellipse.h:470
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 change_range(double t1, double t2)=0
Change parameter range.
double minor_len() const
Return major axis length:長軸の長さを返却する。
Definition: Ellipse.h:578
virtual MGCurve & limit(const MGInterval &rng)=0
Update this by limiting the parameter range of the curve.
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
virtual void ReadMembers(MGIfstream &buf)
メンバデータを読み出す関数.
virtual MGVector eval(double, int nderiv=0, int left=0) const =0
Evaluate n'th derivative data.
MGStraight is a curve of any space dimension, represent a straight line.
Definition: Straight.h:49
virtual MGCurve * part(double t1, double t2, int multiple=0) const =0
Compute part of this curve from parameter t1 to t2.
virtual double knot(int i) const =0
Access to i-th element of knot.
Interval of 1 dimension, i.e. MGInterval is a real line.
Definition: Interval.h:22
virtual double param_normalize(double t) const =0
Normalize parameter value t to the nearest knot if their distance is within tolerance.
MG_DLL_DECLR MGVector operator*(const MGVector &v, const MGMatrix &m)
Represent a positional data.
Definition: Position.h:28
virtual double param_s() const =0
Return starting parameter value.
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
MGCSisect_list defines linked list of MGCSisect.
Definition: CSisect_list.h:22
Defines Knot vector of B-Representation.
Definition: KnotVector.h:28
virtual double range(double t) const
Round t into curve's parameter range.
virtual MGCurve & unlimit_end()=0
Unlimit parameter range of the curve to the end point direction.
Defines Boolean sum surface.
Definition: BSumSurf.h:26
double param_s() const
Return starting parameter value.
Definition: Ellipse.h:608
virtual MGSurface * sweep(const MGUnit_vector &uvec, double start_dist, double end_dist) const =0
Return sweep surface from crv.
MGELLIPSE_TYPE
Ellipse type(楕円の種類).
Definition: MGCL.h:158
virtual bool is_linear(MGStraight &straight) const
Test if this cure is linear or not, that is, is straight or not.
virtual MGCurve & operator-=(const MGVector &v)=0
bool param_range_is_in_radian() const
Test if this ellipase 's parameter range is expressed in radian.
Definition: Ellipse.h:614
MGParam_Vector provides a list to store parameters of a curve.
Definition: CParam_list.h:18
MGSphere is a Sphere in 3D space.
Definition: Sphere.h:42
virtual void WriteMembers(MGOfstream &buf) const
メンバデータを書き込む関数.
Defines a list of MGCCisect(curve to curve intersection).
Definition: CCisect_list.h:20
virtual std::ostream & out(std::ostream &) const
Output virtual function.
virtual const MGKnotVector & knot_vector() const =0
Returns the knot vector of the curve.
virtual void extend(double length, bool start=false)=0
Extrapolate this curve by an (approximate) chord length.
double radius() const
Return the radius of the circle. This is valid only when circle() is true.
Definition: Ellipse.h:662
double major_len() const
Return major axis length:長軸の長さを返却する。
Definition: Ellipse.h:572
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
virtual MGCurve & change_dimension(int sdim, int start1=0, int start2=0)=0
Changing this object's space dimension.
MGCURVE_TYPE
Curve type(曲線の種類).
Definition: MGCL.h:143
MGPosition_list provides a list of Positions.
Definition: Position_list.h:27
virtual MGCurve & operator*=(double scale)=0
virtual double length() const
Compute whole curve length.
Definition: Curve.h:624
MGOgesIfstream write out to *.iges file, transforming MGCL objects to IGES objects.
Definition: IgesOfstream.h:26
MGCURVE_TYPE type() const
Return curve type(曲線のタイプを返す)
Definition: Ellipse.h:686
Defines Surface B-Representation of rational form.
Definition: RSBRep.h:38
virtual bool on(const MGPosition &point, double &t) const
Test if given point is on the curve or not.
virtual bool operator==(const MGCompositeCurve &crv) const
Comparison.
Defines Surface B-Representation, that is , B-Spline surface.
Definition: SBRep.h:48
virtual std::auto_ptr< MGCurve > oneD(const double g[4]) const =0
Obtain transformed 1D curve expression of this curve.
virtual MGCurve * copy_as_nurbs() const =0
copy as a newed curve.
MGEllipse is a class to define an ellipse of 2D or 3D.
Definition: Ellipse.h:38
virtual bool operator<(const MGGel &gel2) const =0
const MGUnit_vector & normal() const
Return normal:楕円のある平面の法線ベクトルを返却する。
Definition: Ellipse.h:581
virtual MGBox box_limitted(const MGInterval &) const =0
Return minimum box that includes the curve of parameter interval.
virtual MGVector eval_deriv(double) const
Compute 1st derivative.
MGEllipse(Ellipse). 楕円
Definition: MGCL.h:146
virtual MGCParam_list intersect_1D(double f, int coordinate=0) const
Compute intersection point of 1D sub curve of original curve.
virtual double param_e() const =0
Return ending parameter value.
virtual double curvilinear_integral() const
Definition: Curve.h:299
virtual MGCCisect_list isect(const MGCurve &curve2) const =0
Intersection of Curve and other geometry.
virtual int intersect_dnum() const =0
Provide divide number of curve span for function intersect.
virtual bool is_planar(MGPlane &plane) const
Test if this cure is planar or not.
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
double param_e() const
Return ending parameter value.
Definition: Ellipse.h:598
virtual int perp_point(const MGPosition &p, double &t, const double *g=0) const
Compute a foot point of the perpendicular line from point p to the curve.
Define a unit vector, is a MGVector.
Definition: Unit_vector.h:17
MGSurfCurve is a curve on a surface.
Definition: SurfCurve.h:43
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30