7 #include "mg/Position.h"
8 #include "mg/Unit_vector.h"
9 #include "mg/CSisect_list.h"
10 #include "mg/Surface.h"
11 #include "mg/Ellipse.h"
12 #include "mg/Straight.h"
149 int SubordinateEntitySwitch=0
155 std::ostream&
out(std::ostream &)
const;
202 bool degenerate_at_v0()
const;
205 bool degenerate_at_v1()
const;
209 double distance(
const MGPosition& point)
const;
230 )
const{
return eval(uv.
ref(0),uv.
ref(1),ndu,ndv);}
255 bool in_range(
double u,
double v)
const;
284 double knot_u(
int i)
const{
return m_ellipseu.knot(i);};
285 double knot_v(
int j)
const{
return m_ellipsev.knot(j);};
307 const MGVector&
M()
const{
return m_ellipseu.major_axis();};
308 const MGVector&
N()
const{
return m_ellipseu.minor_axis();};
309 const MGVector&
B()
const{
return m_ellipsev.minor_axis();};
343 bool outgoing()
const;
402 double radius()
const{
return m_ellipseu.radius();};
413 bool sphere()
const{
return m_ellipseu.circle();};
422 std::string
whoami()
const{
return "Sphere";};
447 void box_driver(
MGBox& bx)
const;
452 void box_uconst(
MGBox& bx,
double u)
const;
457 void box_vconst(
MGBox& bx,
double v)
const;
461 MGBox* compute_box()
const;
470 double u,
double v,
double& du,
double& dv,
479 double du,
double dv,
495 int offset_div_num()
const{
return 1;};
507 void compute_uv(
const MGPosition& P,
double&u,
double&v)
const;
virtual MGSBRep * surf1D(const MGPlane &pl) const =0
virtual MGVector eval(double u, double v, int ndu=0, int ndv=0) const =0
Evaluate surface data.
MG_DLL_DECLR const MGBox mgNULL_BOX
virtual MGSurface & operator=(const MGSurface &gel2)
Definition: Surface.h:74
virtual MGCurve * perimeter_curve(int i) const
Retrieve perimeter i of this surface.
virtual void ReadMembers(MGIfstream &buf)
virtual int perp_point(const MGPosition &P, MGPosition &uv, const MGPosition *uvguess=0) const
Return the foot of the perpendicular straight line from P.
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
const MGVector & B() const
Definition: Sphere.h:309
virtual std::ostream & out(std::ostream &ostrm) const
Output virtual function.
MGPlane is infinite plane in 3D space.
Definition: Plane.h:38
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
virtual bool operator<(const MGGel &gel2) const =0
MGCylinder is a Cylinder in 3D space.
Definition: Cylinder.h:37
virtual MGCurve * isect_incr_pline(const MGPosition &uv, int kdt, double du, double dv, double &u, double &v, int incr=0) const =0
int intersect_dnum_u() const
Definition: Sphere.h:260
virtual int out_to_IGES(MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
Definition: Gel.h:93
MGEllipse & ellipseu()
Definition: Sphere.h:214
MGSURFACE_TYPE type() const
Definition: Sphere.h:420
double param_e_u() const
Return ending parameter value.
Definition: Sphere.h:349
MGEllipse & ellipsev()
Definition: Sphere.h:215
virtual void WriteMembers(MGOfstream &buf) const
virtual bool in_range(double u, double v) const =0
Test if the parameter(u,v) is in this surface's parameter range.
const MGKnotVector & knot_vector_u() const
Returns the u knot vector.
Definition: Sphere.h:288
virtual MGBox box_limitted(const MGBox &uvrange) const =0
Return minimum box that includes limitted surface by uvrange.
virtual MGSurface & exchange_uv()=0
Exchange parameter u and v.
int perimeter_num() const
Return how many perimeters this surface has.
Definition: Sphere.h:382
MGSSisect_list intersectPl(const MGPlane &srf2) const
Default intersection program of MGSurface with a plane.
virtual long identify_type() const =0
Return This object's typeID.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual int sdim() const =0
Return the surface type.
bool operator!=(const MGSphere &gel2) const
Definition: Sphere.h:143
const MGEllipse & ellipseu() const
Return the constituent ellipses of the Sphere.
Definition: Sphere.h:212
MGLBRep is a class for B-SPline representation.
Definition: LBRep.h:41
MGKnotVector & knot_vector_v()
Definition: Sphere.h:293
double param_s_u() const
Return starting parameter value.
Definition: Sphere.h:357
virtual MGSurface & change_range(int is_u, double t1, double t2)=0
Change parameter range, able to change the direction by providing t1 greater than t2...
virtual MGSSisect_list isect(const MGSurface &srf2) const =0
Surface and Surface intersection.
Vector of a general n space dimension.
Definition: Vector.h:26
virtual MGPosition range(const MGPosition &) const
Round the input parameter value uv.
virtual MGPosition closest_on_perimeter(const MGPosition &point) const
Compute the closest point on all the perimeters of the surface.
virtual MGSurface & extend(int perimeter, double param, double length, double dk=0.)
Modify the original Surface by extrapolating the specified perimeter.
Definition: Surface.h:365
Defines a Box of any space dimendion.
Definition: Box.h:34
virtual bool on(const MGPosition &P, MGPosition &) const
Test if point P is ont the surface or not.
Define MGBSumCurve Class(Boolean sum curve of three curves).
Definition: BSumCurve.h:28
MGSurface & operator*=(double scale)=0
MGSurface & operator-=(const MGVector &v)=0
virtual MGSurface * clone() const =0
Construct new surface object by copying to newed area.
double param_e_v() const
Definition: Sphere.h:350
virtual MGSurface * copy_change_dimension(int sdim, int start1=0, int start2=0) const =0
Construct new surface object by changing the original object's space dimension.
const MGKnotVector & knot_vector_v() const
Returns the v knot vector.
Definition: Sphere.h:292
Sphere. 球面
Definition: MGCL.h:177
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
virtual MGCSisect_list isectSl(const MGStraight &sl, const MGBox &uvbox=mgNULL_BOX) const
Intersection of Surface and a straight line.
virtual MGSurface * part(const MGBox &bx, int multiple=0) const =0
Compute part of the surface limitted by the parameter range bx.
MG_DLL_DECLR MGVector operator*(const MGVector &v, const MGMatrix &m)
virtual int isect_order() const =0
Represent a positional data.
Definition: Position.h:28
bool sphere() const
Return if this is sphere(i.e. the length of M, N, and B are all equal) or not.
Definition: Sphere.h:413
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
double knot_u(int i) const
Return knot value of (infinite-minus, infinite-plus)
Definition: Sphere.h:284
MGSurface & operator+=(const MGVector &v)=0
Object transformation.
MGSSisect_list defines linked list of MGSSisect.
Definition: SSisect_list.h:26
MGCSisect_list defines linked list of MGCSisect.
Definition: CSisect_list.h:22
Defines Knot vector of B-Representation.
Definition: KnotVector.h:28
const MGVector & N() const
Definition: Sphere.h:308
Defines Boolean sum surface.
Definition: BSumSurf.h:26
const MGVector & M() const
Definition: Sphere.h:307
virtual MGPosition closest(const MGPosition &point) const
Compute the closest point parameter value (u,v)of this surface from a point.
virtual std::auto_ptr< MGSurface > offset_c1(double ofs_value, int &error) const
C1 continuous Surface offset.
const MGEllipse & ellipsev() const
Definition: Sphere.h:213
MGSphere is a Sphere in 3D space.
Definition: Sphere.h:42
virtual void negate()
Negate direction of surface.
Definition: Surface.h:730
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
MGPosition_list provides a list of Positions.
Definition: Position_list.h:27
virtual bool operator==(const MGGel &gel2) const =0
comparison
virtual double param_error() const
Obtain parameter space error.
MGOgesIfstream write out to *.iges file, transforming MGCL objects to IGES objects.
Definition: IgesOfstream.h:26
virtual MGSurface & change_dimension(int sdim, int start1=0, int start2=0)=0
Changing this object's space dimension.
Defines Surface B-Representation of rational form.
Definition: RSBRep.h:38
const MGPosition & C() const
Definition: Sphere.h:310
MGVector eval(const MGPosition &uv, int ndu=0, int ndv=0) const
Evaluate surface data.
Definition: Sphere.h:226
virtual MGBox param_range() const
Return parameter range.
int intersect_dnum_v() const
Definition: Sphere.h:261
std::string whoami() const
Definition: Sphere.h:422
Defines Surface B-Representation, that is , B-Spline surface.
Definition: SBRep.h:48
const MGPosition & sphere_center() const
Get the center of the sphere.
Definition: Sphere.h:416
MGEllipse is a class to define an ellipse of 2D or 3D.
Definition: Ellipse.h:38
double ref(int i) const
Definition: Position.h:304
MGKnotVector & knot_vector_u()
Definition: Sphere.h:289
virtual MGPosition_list perps(const MGPosition &P) const
Return all foots of perpendicular straight lines from P.
bool operator!=(const MGGel &gel2) const
Definition: Sphere.h:142
MGSURFACE_TYPE
Surface type(曲面の種類).
Definition: MGCL.h:173
double knot_v(int j) const
Access to i-th element of v knot.
Definition: Sphere.h:285
virtual int isect_area_length() const
Definition: Surface.h:1161
MGCSisect_list isect(const MGStraight &line) const
Definition: Sphere.h:266
void isect_dt(double u, double v, double &du, double &dv, double acuRatio=1.) const
double radius() const
Get the radius of the sphere.
Definition: Sphere.h:402
Define a unit vector, is a MGVector.
Definition: Unit_vector.h:17
virtual MGCurve * parameter_curve(int is_u, double x) const =0
Compute parameter curve.
double param_s_v() const
Definition: Sphere.h:358
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