MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
MGFSurface クラスabstract

MGFSurface is an abstract class to provide the comman interfaces to MGFace and MGSurface. [詳解]

MGFSurface の継承関係図
MGFace MGSurface MGBSumSurf MGCylinder MGPlane MGRSBRep MGSBRep MGSphere MGPlaneImage

公開メンバ関数

 MGFSurface ()
 Null FSurface. [詳解]
 
 MGFSurface (const MGFSurface &fsurf)
 Copy constructor. [詳解]
 
virtual ~MGFSurface ()
 
bool operator< (const MGFSurface &f2) const
 Comparison operator. [詳解]
 
bool operator> (const MGFSurface &f2) const
 
virtual void arrow (double u, double v, MGPosition data[10]) const =0
 
virtual void arrow (const MGPosition &uv, MGPosition data[10]) const =0
 
const MGBoxget_box () const
 Get the box of the object. [詳解]
 
virtual const MGBox box_param2 () const =0
 
virtual MGFSurfaceclone_fsurface () const =0
 Get the clone of this MGFSurface. [詳解]
 
virtual MGFaceclone_as_face () const =0
 
virtual MGPosition closest (const MGPosition &point) const =0
 
virtual MGPosition closest_on_boundary (const MGStraight &sl) const =0
 
void display_arrowsFS (mgSysGL &sgl, int udiv=4, int vdiv=4) const
 Display arrows on the surface. [詳解]
 
void drawWireFS (mgVBO &vbo, double span_length, int line_density=1) const
 
void drawWireFS_to_highlight (mgVBO &vbo, double span_length, int line_density) const
 
virtual MGVector eval (double u, double v, int ndu=0, int ndv=0) const =0
 
virtual MGVector eval (const MGPosition &uv, int ndu=0, int ndv=0) const =0
 
void eval_discrete_deviation (const MGFSurface &face2, std::vector< MGPosition > &uvuvs, int npoint=20, double tolerance=0.1) const
 
MGPvector< MGCurveget_all_boundaries (void) const
 Obtain all the boundaries(i.e., outer boundary and all the inner boundaries) [詳解]
 
virtual MGFaceget_face_pointer ()=0
 get face pointer if this is MGFace, else null will be returned. [詳解]
 
virtual const MGFaceget_face_pointer () const =0
 
virtual int get_number_of_boundaries () const =0
 Get number of inner boundaries as the output of the function. [詳解]
 
virtual MGSurfaceget_surface_pointer ()=0
 
virtual const MGSurfaceget_surface_pointer () const =0
 
virtual bool has_commonFS (const MGObject &obj2) const =0
 
bool hasInnerBoundaryLoop () const
 
virtual bool hasLoop (const MGBox &uvbox) const
 
virtual MGPvector< MGCurveinner_boundary (int i) const =0
 
virtual MGPvector< MGCurveinner_boundary_param (int i) const =0
 
virtual bool in_range (double u, double v) const =0
 Test if parameter value (u,v) is in the range of the FSurface parameter. [詳解]
 
virtual bool in_range (const MGPosition &uv) const =0
 
int in_range_with_on (double u, double v) const
 
virtual int in_range_with_on (const MGPosition &uv) const =0
 
virtual MGHHisect_vector isect (const MGShell &shell2) const =0
 Intersection. [詳解]
 
virtual MGSSisect_list isect (const MGFSurface &fsurf) const =0
 
virtual MGSSisect_list isect (const MGFace &fsurf) const =0
 
virtual MGSSisect_list isect (const MGSurface &fsurf) const =0
 
virtual MGCSisect_list isect (const MGCurve &curv) const =0
 
void intersect12Boundary (const MGFSurface &face2, MGPosition_list &uvuv_list) const
 
virtual int isect_boundary (const MGFSurface &face2, MGPosition_list &uvuvs, int id1=0) const =0
 
virtual int isect_incurves (const MGFSurface &face2, int iid, MGPosition_list &uvuv_list, int id1) const =0
 
virtual int isect_outcurves (const MGFSurface &face2, MGPosition_list &uvuv_list, int id1) const =0
 
virtual int isect_guess (const MGCurve &crv, const MGPosition &uvi, double ti, MGPosition &uv, double &t) const
 
virtual int isect_guess (const MGStraight &sl, const MGPosition &uvi, double ti, MGPosition &uv, double &t) const
 
virtual int isect_guess (const MGCompositeCurve &crv, const MGPosition &uvi, double ti, MGPosition &uv, double &t) const
 
virtual int isect_guess_composite (const MGCompositeCurve &crv, const MGPosition &uvi, double ti, MGPosition &uv, double &t) const
 
virtual int isect_guess_straight (const MGStraight &sl, double ti, const MGPosition &uvi, double &t, MGPosition &uv) const
 
virtual double knot_u (int i) const
 Access to i-th element of u knot. [詳解]
 
virtual double knot_v (int i) const
 Access to i-th element of v knot. [詳解]
 
virtual const MGKnotVectorknot_vector_u () const =0
 Returns the u knot vector. [詳解]
 
virtual MGKnotVectorknot_vector_u ()=0
 
virtual const MGKnotVectorknot_vector_v () const =0
 Returns the v knot vector. [詳解]
 
virtual MGKnotVectorknot_vector_v ()=0
 
virtual MGFacemake_face ()=0
 
virtual void negateFS ()=0
 Negate the FSurface. [詳解]
 
virtual MGVector normal (const MGPosition &uv) const =0
 Compute normal vector(not unit) at uv. [詳解]
 
virtual MGVector normal (double u, double v) const =0
 Compute normal vector(not unit) at (u,v). [詳解]
 
virtual int number_of_inner_boundaries () const
 Get number of inner boundaries as the output of the function. [詳解]
 
virtual const MGObjectobject_pointer () const =0
 Get the object point of this MGFSurface. [詳解]
 
virtual MGObjectobject_pointer ()=0
 
virtual int offset_fs (double distance, MGPvector< MGFSurface > &vecOfsFSurface) const =0
 
virtual bool on (const MGPosition &P, MGPosition &uv) const =0
 
virtual bool on_a_perimeter (double &u, double &v, int &perim_num) const =0
 
virtual std::ostream & outFS (std::ostream &ostrm) const =0
 Output virtual function. [詳解]
 
virtual MGPvector< MGCurveouter_boundary () const =0
 
virtual MGPvector< MGCurveouter_boundary_param () const =0
 
virtual MGPosition param (const MGPosition &P) const =0
 Obtain parameter value of the FSurface whose world coordinates are P. [詳解]
 
virtual double param_e_u () const =0
 Return ending parameter value. [詳解]
 
virtual double param_e_v () const =0
 
virtual double param_s_u () const =0
 Return starting parameter value of the base surface. [詳解]
 
virtual double param_s_v () const =0
 
virtual MGPvector< MGCurveparameter_curves (int is_u, double x) const =0
 
double param_error () const
 Obtain parameter space error. [詳解]
 
double param_error_u () const
 
double param_error_v () const
 
virtual MGPosition param_mid () const
 
virtual MGBox param_range () const =0
 
virtual bool perp_guess (const MGPosition &P, const MGPosition &uvguess, MGPosition &uv) const =0
 
virtual bool perp_guess (const MGCurve &curve, const MGPosition &uvguess, double tguess, MGPosition &uv, double &t) const =0
 
virtual int perp_point (const MGPosition &p, MGPosition &uv, const MGPosition *uvguess=0) const =0
 
virtual MGPosition_list perps (const MGPosition &P) const =0
 
virtual int perp_one (const MGPosition &P, MGPosition &uv) const
 
virtual int project (const MGCurve &crv, MGPvector< MGCurve > &vec_crv_uv, MGPvector< MGCurve > &vec_crv, const MGVector &vec=mgNULL_VEC) const
 
virtual int project (const MGCurve &crv, MGPvector< MGCurve > &vec_crv, const MGVector &vec=mgNULL_VEC) const
 
virtual int get_proj_divnum (const MGCurve &crv) const =0
 
virtual MGPosition range (const MGPosition &uv) const =0
 
MGPvector< MGCurveinner_skeleton (int density) const
 
virtual MGPvector< MGCurveskeleton (int density=1) const
 
virtual MGPvector< MGCurveskeleton_at_knots () const
 Obtain all the parameter curves at knots of u and v knot vector. [詳解]
 
virtual void split (double param, bool is_u, MGPvector< MGFSurface > &surfaces) const =0
 split this fsurface at the parameter param. [詳解]
 
void split (const std::vector< const MGCurve * > &splitters, const MGVector &dir, MGPvector< MGFace > &faces) const
 
void split (const MGPvector< MGCurve > &splitters, MGPvector< MGFace > &faces) const
 split this fsurface with splitters. splitters are 2D (u,v) surfaces's parameter curves. [詳解]
 
void extract (const std::vector< const MGCurve * > &trimmers, const MGVector &dir, const MGPosition &uv, std::auto_ptr< MGFace > &eface) const
 
void shadeFS (mgVBO &vbo, const MGDrawParam &para, mgVBO::ELEMENT_TARGET target=mgVBO::SHADING) const
 Shade the object in world coordinates. [詳解]
 
virtual void triangulate (const MGDrawParam &para, MGCL::TL_DATA_KIND dkind, std::vector< mgTL2Triangles > &trisVec) const =0
 Triangulate this object(MGShell, MGFace, or MGSurface is the target). [詳解]
 
void trim (const std::vector< const MGCurve * > &trimmers, const MGVector &dir, const MGPosition &uv, MGPvector< MGFace > &faces) const
 
virtual MGUnit_vector unit_normal (const MGPosition &uv) const =0
 Compute unit normal vector at uv. [詳解]
 
virtual MGUnit_vector unit_normal (double u, double v) const =0
 Compute unit normal vector at (u,v). [詳解]
 

限定公開メンバ関数

virtual int coef_sdim () const =0
 
virtual int isect_area_length () const =0
 
virtual int isect_direction (const MGFSurface &sf2, int m1, MGPosition &uvuvS, double &du, double &dv, double acuRatio=1.) const
 
int isect_direction_with_direction (double u, double v, const MGVector &tangent, double &du, double &dv) const
 
void isect_dt (double u, double v, double &du, double &dv, double acuRatio=1.) const
 
virtual void isect_inner_dt (int n, const MGPosition &uvnow, double &du, double &dv, int &kdt, double acuRatio=1.) const
 
double isect_dt_coef (int n) const
 
int isect_div_id_max () const
 
virtual MGCurveisect_incr_pline (const MGPosition &uv, int kdt, double du, double dv, double &u, double &v, int incr=0) const =0
 
int isect_start (const MGPosition &uvuv_startIn, MGPosition_list &uvuv_list, const MGFSurface &sf2, MGSSisect &ssi, MGPosition_list::iterator &uvuv_id, int &m1) const
 
int isect_start_boundary (const MGFSurface &sf2, const MGPosition &uvuv_pre, int kdt, double du, double dv, int lid1, MGPosition &uvuv_now) const
 
double isect_start_dif (const MGNDDArray &tau, const MGLBRep &line, const MGFSurface &sf2) const
 
int isect_start_incr (const MGFSurface &sf2, const MGPosition &uvuv_pre, int kdt, double du, double dv, int lid1, MGPosition &uvuv_now) const
 
int isect_startPt (const MGPosition &uvuv_startIn, MGPosition_list &uvuv_list, const MGFSurface &sf2, double acuRatio, MGBPointSeq &point, MGPosition_list::iterator &uvuv_id, int &m1) const
 
int isect_startPlane (const MGPosition &uvuvS, MGPosition_list &uvuv_list, const MGPlane &pl, MGSSisect &ssi, MGPosition_list::iterator &uvuv_id) const
 
int isect_startPlanePt (const MGPosition &uvuv_startIn, MGPosition_list &uvuv_list, const MGPlane &pl2, double acuRatio, MGBPointSeq &point, MGPosition_list::iterator &uvuv_id) const
 
MGSSisect_list isect_with_surf (MGPosition_list &uvuv_list, const MGFSurface &srf2) const
 Compute the intersection lines of this surface and srf2(both are not planes). [詳解]
 
MGSSisect_list isect_with_plane (MGPosition_list &uvuv_list, const MGPlane &pl, const MGFSurface &fsrf2) const
 
int projectbyApproximateAsLBRep (const MGCurve &crv, MGPvector< MGCurve > &vec_crv_uv, MGPvector< MGCurve > &vec_crv, const MGVector &vec) const
 
int projectbyRemovKnots (const MGCurve &crv, MGPvector< MGCurve > &vec_crv_uv, MGPvector< MGCurve > &vec_crv, const MGVector &vec) const
 
int projVector (const MGCurve &crv, MGPvector< MGCurve > &vec_crv_uv, MGPvector< MGCurve > &vec_crv, const MGVector &vec) const
 カーブを折れで分割して行い、後で接続する [詳解]
 
int projNormal (const MGCurve &crv, MGPvector< MGCurve > &vec_crv_uv, MGPvector< MGCurve > &vec_crv) const
 カーブを折れで分割して行い、後で接続する [詳解]
 

詳解

MGFSurface is an abstract class to provide the comman interfaces to MGFace and MGSurface.

構築子と解体子

MGFSurface::MGFSurface ( )
inline

Null FSurface.

MGFSurface::MGFSurface ( const MGFSurface fsurf)
inline

Copy constructor.

virtual MGFSurface::~MGFSurface ( )
inlinevirtual

関数詳解

virtual void MGFSurface::arrow ( double  u,
double  v,
MGPosition  data[10] 
) const
pure virtual

Generate arrow data of the tangent along u and v and the normal at the parameter value (u,v) of the FSurface. data[0] is the origin of the u-tangent arrow, data[1] is the top of the u-tangent arrow, data[2], [3] are two bottoms of u-tangent arrowhead. data[0], [4], [5], [6] are the points of v-tangent arrow. data[0], [7], [8], [9] are the points of v-tangent arrow.

MGFace, MGSurfaceで実装されています。

virtual void MGFSurface::arrow ( const MGPosition uv,
MGPosition  data[10] 
) const
pure virtual

MGFace, MGSurfaceで実装されています。

virtual const MGBox MGFSurface::box_param2 ( ) const
pure virtual

Return box of the parameter space of the FSurface. After trimmed one.

MGFace, MGSurfaceで実装されています。

virtual MGFace* MGFSurface::clone_as_face ( ) const
pure virtual

Get the clone of this as a MGFace. If this is MGSurface, it is converted to MGFace.

MGFace, MGSurfaceで実装されています。

virtual MGFSurface* MGFSurface::clone_fsurface ( ) const
pure virtual

Get the clone of this MGFSurface.

MGFace, MGSurfaceで実装されています。

virtual MGPosition MGFSurface::closest ( const MGPosition point) const
pure virtual

Compute closest point from a point. Returned is the parameter value of the FSurface that is closest to point.

引数
pointthe target point.

MGFace, MGPlane, MGSurface, MGSphere, MGCylinderで実装されています。

virtual MGPosition MGFSurface::closest_on_boundary ( const MGStraight sl) const
pure virtual

Compute closest point from a line to the boundary of the MGFSurface. Returned is the parameter value of the FSurface that is closest to sl.

引数
slThe target line.

MGFace, MGSurfaceで実装されています。

virtual int MGFSurface::coef_sdim ( ) const
protectedpure virtual

Obtain coefficient's space dimension. This function is used in isect_start etc.

MGSurfaceで実装されています。

void MGFSurface::display_arrowsFS ( mgSysGL sgl,
int  udiv = 4,
int  vdiv = 4 
) const

Display arrows on the surface.

void MGFSurface::drawWireFS ( mgVBO vbo,
double  span_length,
int  line_density = 1 
) const

Draw 3D curve in world coordinates. The object is converted to curve(s) and is drawn.

引数
vboThe target graphic object.
span_lengthLine segment span length.
line_densityline density to draw a surface in wire mode.
void MGFSurface::drawWireFS_to_highlight ( mgVBO vbo,
double  span_length,
int  line_density 
) const
引数
vboThe target graphic object.
span_lengthLine segment span length.
line_densityline density to draw a surface in wire mode.
virtual MGVector MGFSurface::eval ( double  u,
double  v,
int  ndu = 0,
int  ndv = 0 
) const
pure virtual

Evaluation Input parameter value is not checked if it is in_range() or not. Even if it is not in_range(), surFSurface evaluation will be executed.

引数
uFSurface parameter u of value(u,v)
vFSurface parameter v of value(u,v)
nduOrder of derivative along u.
ndvOrder of derivative along v.

MGSBRep, MGRSBRep, MGSurface, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual MGVector MGFSurface::eval ( const MGPosition uv,
int  ndu = 0,
int  ndv = 0 
) const
pure virtual
引数
uvFSurface parameter value(u,v)
nduOrder of derivative along u.
ndvOrder of derivative along v.

MGSBRep, MGRSBRep, MGSurface, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

void MGFSurface::eval_discrete_deviation ( const MGFSurface face2,
std::vector< MGPosition > &  uvuvs,
int  npoint = 20,
double  tolerance = 0.1 
) const

Evaluate deviations of two faces(this and face2) at npoint discrete points. (1)Search the common edges which have the distance within tolerance. (2)Compute the nearest points from npoint discrete points of this to face2. Let uvuvi=uvuvs[i], then uvuvi[0], [1] are this face's parameter value(u1,v1), and uvuvi[2], [3] are parameter value(u2,v2) of face2 which is the nearest point from the point (u1, v1).

引数
face2The target 2nd surface.
uvuvsthe nearest points pairs are set.
npointindicates how many discrete points be obtained.
tolerancetolerance to get two edge to compute deviation.
void MGFSurface::extract ( const std::vector< const MGCurve * > &  trimmers,
const MGVector dir,
const MGPosition uv,
std::auto_ptr< MGFace > &  eface 
) const

Extract a sub surface with trimmers. trimmers are 3D curves and will be projected onto this surface tword the direction dir. If dir is null vector, surface normal prjection will be performed. Extraction is so performed that the smallest region enclosed by trimmers that includes the surface point uv will be extracted.

引数
trimmersTrimmer curves
dirtrimmers projection direction.
uvsurface parameter (u,v) that indicates the region to extract. The smallest region that inclued uv will be extracted.
efaceResult extracted face will be output.
MGPvector<MGCurve> MGFSurface::get_all_boundaries ( void  ) const

Obtain all the boundaries(i.e., outer boundary and all the inner boundaries)

const MGBox& MGFSurface::get_box ( ) const

Get the box of the object.

virtual MGFace* MGFSurface::get_face_pointer ( )
pure virtual

get face pointer if this is MGFace, else null will be returned.

MGSurface, MGFaceで実装されています。

virtual const MGFace* MGFSurface::get_face_pointer ( ) const
pure virtual

MGSurface, MGFaceで実装されています。

virtual int MGFSurface::get_number_of_boundaries ( ) const
pure virtual

Get number of inner boundaries as the output of the function.

MGSurface, MGFaceで実装されています。

virtual int MGFSurface::get_proj_divnum ( const MGCurve crv) const
pure virtual

Define curve division number when a curve crv be projected onto this MGFSurface. The result is used in prj2GetParamRange().

virtual MGSurface* MGFSurface::get_surface_pointer ( )
pure virtual

get surface pointer. Null will never be returned if this is valid MGFSurface. That is, if this is MGFace, base surface will be returned.

MGSurface, MGFaceで実装されています。

virtual const MGSurface* MGFSurface::get_surface_pointer ( ) const
pure virtual

MGSurface, MGFaceで実装されています。

virtual bool MGFSurface::has_commonFS ( const MGObject obj2) const
pure virtual

Test if this and 2nd object has common area about their box(), taking error into account.

MGSurface, MGFaceで実装されています。

bool MGFSurface::hasInnerBoundaryLoop ( ) const
inline

Test if this FSurface has inner boundary loops or not. If this has one, return true.

virtual bool MGFSurface::hasLoop ( const MGBox uvbox) const
inlinevirtual

Test if this FSurface has boundary loops or not in the specified box. If this has one, return true.

MGFaceで再実装されています。

virtual bool MGFSurface::in_range ( double  u,
double  v 
) const
pure virtual

Test if parameter value (u,v) is in the range of the FSurface parameter.

MGSBRep, MGSurface, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual bool MGFSurface::in_range ( const MGPosition uv) const
pure virtual

MGSBRep, MGSurface, MGRSBRep, MGFace, MGPlane, MGCylinderで実装されています。

int MGFSurface::in_range_with_on ( double  u,
double  v 
) const
inline

Test if (u,v) is inside the face. Function's return value is: 0:outside the face. 1:unknown. 2:inside the face, not on a boundary. <0:(u,v) is on an inner boundary, and abs(return code) is the loop id. 4:(u,v) is on the outer boundary. >=10: (u,v) is on a perimeter, (10+perimeter number) will be returned.

virtual int MGFSurface::in_range_with_on ( const MGPosition uv) const
pure virtual

MGSurface, MGFaceで実装されています。

virtual MGPvector<MGCurve> MGFSurface::inner_boundary ( int  i) const
pure virtual

Obtain i-th inner_boundary curves(world coordinates representation) of the FSurface. Let the output of inner_boundary(i) be wcurves and of inner_boundary_param(i) be pcurves, then wcurves[j] corresponds to pcurves[j] one to one. Number of inner_boundary can be obtained by the function number_of_inner_boundary().

MGSurface, MGFaceで実装されています。

virtual MGPvector<MGCurve> MGFSurface::inner_boundary_param ( int  i) const
pure virtual

Obtain i-th inner_boundary curves(world coordinates representation) of the FSurface. Let the output of inner_boundary(i) be wcurves and of inner_boundary_param(i) be pcurves, then wcurves[j] corresponds to pcurves[j] one to one. Number of inner_boundary can be obtained by the function number_of_inner_boundary().

MGSurface, MGFaceで実装されています。

MGPvector<MGCurve> MGFSurface::inner_skeleton ( int  density) const
void MGFSurface::intersect12Boundary ( const MGFSurface face2,
MGPosition_list uvuv_list 
) const

Compute all the intersection points of this face's boundaries(out or inner) with face2, and vice versa. These intersection points are used to compute surface to surface intersection lines.

引数
face2The second surface.
uvuv_listThe intersection points will be output, One member of uvuv_list is (u1,v1,u2,v2), where (u1,v1) is a parameter of this surface and (u2,v2) is a parameter of surf.
virtual MGHHisect_vector MGFSurface::isect ( const MGShell shell2) const
pure virtual

Intersection.

MGSurface, MGFaceで実装されています。

virtual MGSSisect_list MGFSurface::isect ( const MGFSurface fsurf) const
pure virtual

MGSurface, MGFaceで実装されています。

virtual MGSSisect_list MGFSurface::isect ( const MGFace fsurf) const
pure virtual

MGSurface, MGFaceで実装されています。

virtual MGSSisect_list MGFSurface::isect ( const MGSurface fsurf) const
pure virtual

MGSBRep, MGSurface, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual MGCSisect_list MGFSurface::isect ( const MGCurve curv) const
pure virtual

MGSBRep, MGSurface, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual int MGFSurface::isect_area_length ( ) const
protectedpure virtual

isect_area_length() returns initial area length for the intersection line.

MGSurfaceで実装されています。

virtual int MGFSurface::isect_boundary ( const MGFSurface face2,
MGPosition_list uvuvs,
int  id1 = 0 
) const
pure virtual

Compute intersection points of this face's boundary(outer and inners) with face2. If intersection points are found and the boundary is a loop, the point's edge pointer(of this) will be stored in a member uvuv of uvuvs. uvuv[7] is the edge pointer. If the boundary is not a loop(that is, a perimeter of Surfaces), uvuv.sdim()==7 and an edge pointer is not returned. When uvuv.sdim()==8, the edge pointer of uvuv[7] is accessed through union mgEdgeP. uvuvs[i] is i-th intersection points.

引数
face2The target 2nd face.
uvuvsid1 and id2 are the ids of uvuv where this face's and f2's parameters are to be stored in a member of uvuvs. This face's (u,v) is stored in uvuv(id1) and (id1+1). f2's (u,v) is stored in uvuv(id2) and (id2+1). id2=0 if id1=2, and id2=2 if id1=0.
id1id indicator of uvuvs as above.
virtual int MGFSurface::isect_direction ( const MGFSurface sf2,
int  m1,
MGPosition uvuvS,
double &  du,
double &  dv,
double  acuRatio = 1. 
) const
protectedvirtual

isect_direction() is used by isect_startPt() to define which constant parameter line should be used to compute intersection, and what incremental value be used for the parameter. Function's return value is direction to get next intersection(with dt). When =1: u=const direction, =0: v=const, =-1: cannot get intersection.

引数
sf2Second surface for the intersection.
m1id of uvuvS that indicates this surface's parameter position in uvuvS. (uvuvS(m1), uvuvS(m1+1))=(u,v) of this surface.
uvuvSstart parameter (u,v) pair of this surface and sf2.
duIncremental value of the parameter kind of kdt will be output.
dvRight dt will be output according to the function's output =0,1.
acuRatioacuracy ratio.

MGSurfaceで再実装されています。

int MGFSurface::isect_direction_with_direction ( double  u,
double  v,
const MGVector tangent,
double &  du,
double &  dv 
) const
protected

isect_direction_with_direction() is used by isect_start() to define which constant parameter line should be use to compute intersection, and what incremental value be used for the parameter. Function's return value isect_direction() is 1 for u=const parameter line, and 0 for v=const parameter line.

引数
ustart parameter u of (u,v) of this surface.
vstart parameter v of (u,v) of this surface.
tangentTo indicate which direction isect line should march toward.
duIncremental value sign of the parameter kind of
dvisect_direction_with_direction.
int MGFSurface::isect_div_id_max ( ) const
protected

isect_div_id_max is maximum id of array of sect_div defined in isect_dt_coef. That is, isect_div_id_max+1 is the length of the array sect_div.

void MGFSurface::isect_dt ( double  u,
double  v,
double &  du,
double &  dv,
double  acuRatio = 1. 
) const
protected

isect_dt computes incremental values du and dv for the intersection computation at parameter position (u,v).

引数
uSurface parameter u of (u,v).
vv of (u,v).
duu incremental value is output.
dvv incremental value is output.
acuRatioacuracy ratio.
double MGFSurface::isect_dt_coef ( int  n) const
protected

isect_dt_coef provides coef of how fine parameter increment should be, given num of intersection points computed so far.

virtual int MGFSurface::isect_guess ( const MGCurve crv,
const MGPosition uvi,
double  ti,
MGPosition uv,
double &  t 
) const
virtual

"isect_guess" computes one intersection point of surface and a curve, given initail guess parameter values of surface and curve. Function's return value is 1(true) if i.p. obtained, and 0(false) if not.

引数
crvCurve.
uviInput initial guess parameter value of the i.p. of the surface.
tiInput initial guess parameter value of the line.
uvOutput parameter value obtained.
tOutput parameter value obtained.
virtual int MGFSurface::isect_guess ( const MGStraight sl,
const MGPosition uvi,
double  ti,
MGPosition uv,
double &  t 
) const
inlinevirtual

"isect_guess" computes one intersection point of surface and a curve, given initail guess parameter values of surface and curve. Function's return value is 1(true) if i.p. obtained, and 0(false) if not.

引数
slCurve.
uviInput initial guess parameter value of the i.p. of the surface.
tiInput initial guess parameter value of the line.
uvOutput parameter value obtained.
tOutput parameter value obtained.
virtual int MGFSurface::isect_guess ( const MGCompositeCurve crv,
const MGPosition uvi,
double  ti,
MGPosition uv,
double &  t 
) const
inlinevirtual

"isect_guess" computes one intersection point of surface and a curve, given initail guess parameter values of surface and curve. Function's return value is 1(true) if i.p. obtained, and 0(false) if not.

引数
crvCurve
uviInput initial guess parameter value of the i.p. of the surface.
tiInput initial guess parameter value of the line.
uvOutput parameter value obtained.
tOutput parameter value obtained.
virtual int MGFSurface::isect_guess_composite ( const MGCompositeCurve crv,
const MGPosition uvi,
double  ti,
MGPosition uv,
double &  t 
) const
virtual

"isect_guess" computes one intersection point of surface and a curve, given initail guess parameter values of surface and curve. Function's return value is 1(true) if i.p. obtained, and 0(false) if not.

引数
crvCurve
uviInput initial guess parameter value of the i.p. of the surface.
tiInput initial guess parameter value of the line.
uvOutput parameter value obtained.
tOutput parameter value obtained.
virtual int MGFSurface::isect_guess_straight ( const MGStraight sl,
double  ti,
const MGPosition uvi,
double &  t,
MGPosition uv 
) const
virtual

"isect_guess_straight" computes one intersection point of surface and a straight line, given initail guess parameter values of the surface and the straight line. Function's return value is 1(true) if i.p. obtained, and 0(false) if not.

引数
slStraight line.
tiInitial guess parameter value of the straight.
uviInput initial guess parameter value of the i.p. of the surface.
tStraight parameter obtained.
uvSurface parameter value obtained(u,v).
virtual MGCurve* MGFSurface::isect_incr_pline ( const MGPosition uv,
int  kdt,
double  du,
double  dv,
double &  u,
double &  v,
int  incr = 0 
) const
protectedpure virtual

"isect1_incr_pline" is a dedicated function of isect_start_incr, will get shortest parameter line necessary to compute intersection.

引数
uvlast intersection point.
kdtInput if u=const v-parameter line or not. true:u=const, false:v=const.
duIncremental u parameter length.
dvIncremental v parameter length.
unext u value will be output
vnext v value will be output
incrIncremental valuse of B-coef's id.

MGSurfaceで実装されています。

virtual int MGFSurface::isect_incurves ( const MGFSurface face2,
int  iid,
MGPosition_list uvuv_list,
int  id1 
) const
pure virtual

Compute intersection points between the boundary of iid-th inner boundary of this face and face2 to compute intersections of face with face2. Function's return value is the number of ip's obtained before appending into uvuv_list, may not be equal to the enlarged size of uvuv_list.

引数
face22nd surface
iidInner loop id of this face(from 0)
uvuv_listintersection points will be appended, One member in the list is of sdim 8, (4,5,6) is the direction vector, and (7) is Edge pointer of the point.
id1id of uvuv(a member of uvuv_list), uvuv(id1) for this face parameter uvuv(id2) for face2 parameter, id2=0 if id1=2, and id2=2 if id1=0.
virtual void MGFSurface::isect_inner_dt ( int  n,
const MGPosition uvnow,
double &  du,
double &  dv,
int &  kdt,
double  acuRatio = 1. 
) const
protectedvirtual

"isect_inner_dt" is a dedicated function of isect_startPt, comutes adequate incremental parameter value(du,dv) and parameter line kind kdt(u=const or v=const).

引数
nnum of i.p. obtained so far(not include uvnow).
uvnowintersection point obtained last(of this).
duInput u incremental value,
dvincremental length from previous to uvnow is input. New du or dv will be output according to kdt's return value.
kdtParameter kind used so far is input, will be output as: =1:parameter line kind(u=const), =0: v=const, =-1:should halt computation since incremental value is zero.
acuRatioAccurate ratio.

MGSurfaceで再実装されています。

virtual int MGFSurface::isect_outcurves ( const MGFSurface face2,
MGPosition_list uvuv_list,
int  id1 
) const
pure virtual

Compute intersection points of outer boundary curves of this face with face2 to compute intersections. Function's return value is the number of ip's obtained(appended) into uvuv_list, may not be equal to the enlarged size of uvuv_list.

引数
face22nd surface
uvuv_listintersection points will be appended, One member in the list is of sdim 7, and the last three elements are the ip direction vector.
id1id of uvuv(a member of uvuv_list), uvuv(id1) for this face parameter uvuv(id2) for srf or face2 parameter, id2=0 if id1=2, and id2=2 if id1=0.
int MGFSurface::isect_start ( const MGPosition uvuv_startIn,
MGPosition_list uvuv_list,
const MGFSurface sf2,
MGSSisect ssi,
MGPosition_list::iterator uvuv_id,
int &  m1 
) const
protected

isect_start compute one intersection line of two surfaces, this and sf2, given starting intersetion point uvuv((u1,v1) of this and (u2,v2) of sf2) and direction(stan). isect_start halts the computation when intersection reached to a boundary of this or sf2, or reached to one of the points in uvuv_list. The function's return value is: =0: Intersection was not obtained. !=0: Intersection was obtained as follows: =1: End point is a point on a perimeter of one of the surfaces. =3: End point is one of boundary points in uvuv_list. =4: End point is the starting point. =7: isect_start halted the computation since intersection was lost during the computation.

引数
uvuv_startInStarting point of the intersection line.
uvuv_listisect_start will halt when ip reached one of the point in uvuv_list. isect_start does not change uvuv_list(actually uvuv_list is const.) uvuv's space dimension is at least 4, and the first 2 is (u,v) of this and the next 2 is (u,v) of sf2.
sf22nd surface.
ssiSurface-surface intersection line will be output.
uvuv_idWhen the end point of ip was one of the points of uvuv_list, uvuv_list's iterator of the point will be returned, that is, when the function's return value was 3 or 5. When was not a point of uvuv_list, end() of uvuv_list will be returned.
m1id that indicates which surface was used as the main surface. m1=0: this surface, m1=2: sf2.
int MGFSurface::isect_start_boundary ( const MGFSurface sf2,
const MGPosition uvuv_pre,
int  kdt,
double  du,
double  dv,
int  lid1,
MGPosition uvuv_now 
) const
protected

"isect_start_boundary" is a dedicated function of isect_start. "isect_start_boundary" computes one intersection point of two surfaces, this surface's parameter line at uv+dt(according to kdt) and sb2, given previous intersetion point(uv) and incremental value dt. "isect_start_boundary" is used only when no intersection found at dt. Function's return value is 0: ip not found. 2: ip found as intersection line end point.

引数
sf22nd surface b-rep.
uvuv_preStarting parameter values of ip.
kdtkdt=true: u=const parameter line, else: v=const parameter line of this surface.
duIncremental u parameter length.
dvIncremental v parameter length.
lid1id of parameter of this surface in uvuv_pre or uvuv_now.
uvuv_nowNew parameter values of ip will be output.
double MGFSurface::isect_start_dif ( const MGNDDArray tau,
const MGLBRep line,
const MGFSurface sf2 
) const
protected

Compute the maximum difference between the intersection line and the two surfaces, this and sr2. The difference evaluation is done at the data point tau.

引数
taudata points
linethe intersection line of this and sf2.
sf2second surface.
int MGFSurface::isect_start_incr ( const MGFSurface sf2,
const MGPosition uvuv_pre,
int  kdt,
double  du,
double  dv,
int  lid1,
MGPosition uvuv_now 
) const
protected

isect_start_incr compute one intersection point of two surfaces, this surface's parameter line at uv1+dt(according to kdt) and sf2, given previous intersetion point(uv1,uv2) and incremental value dt. Here uv1 is uvuv_pre(lid1, lid1+1), and uv2 is other two values of uvuvpre. isect_start_incr is a dedicated function of isect_start and isect_start_boundary. Function's return value is true: if ip found, false: if ip not found.

引数
sf22nd surface b-rep.
uvuv_preStarting parameter values of ip.
kdtkdt=true: u=const parameter line, else: v=const parameter line of this surface.
duIncremental u parameter length.
dvIncremental v parameter length.
lid1id of parameter of this surface in uvuv_pre or uvuv_now.
uvuv_nowNew parameter values of ip will be output.
int MGFSurface::isect_startPlane ( const MGPosition uvuvS,
MGPosition_list uvuv_list,
const MGPlane pl,
MGSSisect ssi,
MGPosition_list::iterator uvuv_id 
) const
protected

Compute an intersection line of this surface(a surface that is converted to 1D SBRep surface(sf1d)) and a plane pl. sf1D is so converted that pl be x=0. plane. This surface is the original surface and pl is the original plane. The function's return value is: =0: Intersection was not obtained. !=0: Intersection was obtained as follows: =1: End point is a point on a perimeter of one of the surfaces. =3: End point is one of boundary points in uvuv_list. =4: End point is the starting point. =7: isect_start halted the computation since intersection was lost during the computation.

引数
uvuvSStarting parameter value of the intersection.
uvuv_listisect_startPlane will halt when ip reached one of the point in uvuv_list. isect_startPlane does not change uvuv_list(actually uvuv_list is const.) uvuv's space dimension is at least 4, and the first 2 is (u,v) of this and the next 2 is (u,v) of pl. When uvuv's space dimension is more than 4, it indicates that the uvuv is used to input approcimate tangent of the intersection.
plPlane expression(2nd surface for the intersection).
ssiSurface-surface intersection line will be output.
uvuv_idWhen the end point of ip was one of the points of uvuv_list, uvuv_list's iterator of the point will be returned, that is, when the function's return value was 3 or 5. When was not a point of uvuv_list, end() of uvuv_list will be returned.
int MGFSurface::isect_startPlanePt ( const MGPosition uvuv_startIn,
MGPosition_list uvuv_list,
const MGPlane pl2,
double  acuRatio,
MGBPointSeq point,
MGPosition_list::iterator uvuv_id 
) const
protected

isect_startPlanePt compute an array of parameter value pairs of this surf and pl2 for one intersection line of a surface and a plane, given starting intersetion point uvuv((u1,v1) of this and (u2,v2) of pl2) and direction in uvuv_startI(4-6) (optionally). isect_startPlanePt is a dedicated function for isect_startPlane. isect_startPlanePt halts the computation when intersection reached to a boundary of this, or reached to one of the points in uvuv_list. The function's return value is: =0: Intersection was not obtained. !=0: Intersection was obtained as follows: =1: End point is a point on a perimeter of this surfaces. =3: End point is one of boundary points in uvuv_list. =4: End point is the starting point. =7: isect_startPlanePt halted the computation since intersection was lost during the computation.

引数
uvuv_startInStarting point of the intersection line.
uvuv_listisect_startPlanePt will halt when ip reached one of the point in uvuv_list. isect_startPlanePt does not change uvuv_list(actually uvuv_list is const.) uvuv's space dimension is at least 4, and the first 2 is (u,v) of this and the next 2 is (u,v) of pl2.
pl22nd surface(MGPlane).
acuRatioAccurate ratio, should be decreased by multiplyng .2 (or a number less than 1.).
pointSurface-surface intersection parameter values will be returned as:point(.,0) and point(.,1) for(u,v) of this surface point(.,2) and point(.,3) for(u,v) of pl2. point will have the dimension of(.,7).
uvuv_idWhen the end point of ip was one of the points of uvuv_list, uvuv_list's iterator of the point will be returned, that is, when the function's return value was 3. When was not a point of uvuv_list, end() of uvuv_list will be returned.
int MGFSurface::isect_startPt ( const MGPosition uvuv_startIn,
MGPosition_list uvuv_list,
const MGFSurface sf2,
double  acuRatio,
MGBPointSeq point,
MGPosition_list::iterator uvuv_id,
int &  m1 
) const
protected

isect_startPt compute an array of parameter value pairs of this surf and sf2 for one intersection line of the two surfaces, given starting intersetion point uvuv((u1,v1) of this and (u2,v2) of sf2) and direction(stan). isect_startPt is a dedicated function for isect_start. isect_startPt halts the computation when intersection reached to a boundary of this or sf2, or reached to one of the points in uvuv_list. The function's return value is: =0: Intersection was not obtained. !=0: Intersection was obtained as follows: =1: End point is a point on a perimeter of one of the surfaces. =3: End point is one of boundary points in uvuv_list. =4: End point is the starting point. =7: isect_start halted the computation since intersection was lost during the computation.

引数
uvuv_startInStarting point of the intersection line.
uvuv_listisect_startPt will halt when ip reached one of the point in uvuv_list. isect_startPt does not change uvuv_list(actually uvuv_list is const.) uvuv's space dimension is at least 4, and the first 2 is (u,v) of this and the next 2 is (u,v) of sf2.
sf22nd surface.
acuRatioAccurate ratio, should be decreased by multiplyng .2 (or a number less than 1.).
pointSurface-surface intersection parameter values will be returned as:point(.,0) and point(.,1) for(u,v) of this surface point(.,2) and point(.,3) for(u,v) of this surface. point has the dimension of(.,7).
uvuv_idWhen the end point of ip was one of the points of uvuv_list, uvuv_list's iterator of the point will be returned, that is, when the function's return value was 3 or 5, When was not a point of uvuv_list, end() of uvuv_list will be returned.
m1id that indicates which surface was used as the main surface, m1=0: this surface, m1=2: sf2.
MGSSisect_list MGFSurface::isect_with_plane ( MGPosition_list uvuv_list,
const MGPlane pl,
const MGFSurface fsrf2 
) const
protected

Compute the intersection lines of this(is not a plane) surface and a plane pl. sd1D that is converted to surf1D() about pl is necessary to input.

引数
uvuv_listLet a member of uvuv_list be uvuv. Then, uvuv's space dimension is at least 4, and the first 2 is (u,v) of this and the next 2 is (u,v) of pl. When uvuv's space dimension is more than 4, it indicates that the uvuv is used to input approximate tangent of the intersection.
plPlane expression(2nd surface for the intersection).
fsrf2Original FSurface before casting to plane.
MGSSisect_list MGFSurface::isect_with_surf ( MGPosition_list uvuv_list,
const MGFSurface srf2 
) const
protected

Compute the intersection lines of this surface and srf2(both are not planes).

引数
uvuv_listLet a member of uvuv_list be uvuv. Then, uvuv's space dimension is at least 4, and the first 2 is (u,v) of this and the next 2 is (u,v) of srf2. When uvuv's space dimension is more than 4, it indicates that the uvuv is used to input approximate tangent of the intersection.
srf22nd surface for the intersection.
virtual double MGFSurface::knot_u ( int  i) const
inlinevirtual

Access to i-th element of u knot.

MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで再実装されています。

virtual double MGFSurface::knot_v ( int  i) const
inlinevirtual

Access to i-th element of v knot.

MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで再実装されています。

virtual const MGKnotVector& MGFSurface::knot_vector_u ( ) const
pure virtual

Returns the u knot vector.

MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual MGKnotVector& MGFSurface::knot_vector_u ( )
pure virtual

MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual const MGKnotVector& MGFSurface::knot_vector_v ( ) const
pure virtual

Returns the v knot vector.

MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual MGKnotVector& MGFSurface::knot_vector_v ( )
pure virtual

MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。

virtual MGFace* MGFSurface::make_face ( )
pure virtual

This must be a newed MGFace or MGSurface object. If this is a MGFace, returns this pointer. If this is a MGSurface, construct a newed MGFace using this newed MGSurface, and returns the MGFace*.

MGFaceで実装されています。

virtual void MGFSurface::negateFS ( )
pure virtual

Negate the FSurface.

MGSurface, MGFaceで実装されています。

virtual MGVector MGFSurface::normal ( const MGPosition uv) const
pure virtual

Compute normal vector(not unit) at uv.

MGSurface, MGFace, MGPlaneで実装されています。

virtual MGVector MGFSurface::normal ( double  u,
double  v 
) const
pure virtual

Compute normal vector(not unit) at (u,v).

MGSurface, MGFace, MGPlaneで実装されています。

virtual int MGFSurface::number_of_inner_boundaries ( ) const
inlinevirtual

Get number of inner boundaries as the output of the function.

MGFaceで再実装されています。

virtual const MGObject* MGFSurface::object_pointer ( ) const
pure virtual

Get the object point of this MGFSurface.

MGSurface, MGFaceで実装されています。

virtual MGObject* MGFSurface::object_pointer ( )
pure virtual

MGSurface, MGFaceで実装されています。

virtual int MGFSurface::offset_fs ( double  distance,
MGPvector< MGFSurface > &  vecOfsFSurface 
) const
pure virtual

Offset. distance is plus value if the direction is toward normal vector of the FSurface. Minus if against the normal vector. エラーコード 0:成功 -1:曲率半径以上のオフセット不可 -3:面生成コンストラクタエラー

MGSurface, MGFaceで実装されています。

virtual bool MGFSurface::on ( const MGPosition P,
MGPosition uv 
) const
pure virtual

Test if a point P is on the FSurface. Returned is true if the point P is on the FSurface. false(0) if P was not on the FSurface.

引数
PThe target point.
uvParameter value of the FSurface is returrned, Even if P is not on the FSurface, nearest point parameter value will be returned.

MGSurface, MGFace, MGPlane, MGSphere, MGCylinderで実装されています。

virtual bool MGFSurface::on_a_perimeter ( double &  u,
double &  v,
int &  perim_num 
) const
pure virtual

Test if input (u,v) is parameter value on a perimeter of the base surface. If u or v is on a perimeter, they will be updated to the perimeter value.

引数
uSurface parameter u of (u,v)
vSurface parameter v of (u,v)
perim_numif function returns true, the perimete number is output.

MGFace, MGSurface, MGPlane, MGCylinderで実装されています。

bool MGFSurface::operator< ( const MGFSurface f2) const

Comparison operator.

bool MGFSurface::operator> ( const MGFSurface f2) const
inline
virtual MGPvector<MGCurve> MGFSurface::outer_boundary ( ) const
pure virtual

Obtain outer_boundary curves(world coordinates representation) of the FSurface. Let the output of outer_boundary() be wcurves and of outer_boundary_param() be pcurves, then wcurves[i] corresponds to pcurves[i] one to one. The output curves can be considered as a continuous counter-clockwise ordered boundary of the surface.

MGSurface, MGFaceで実装されています。

virtual MGPvector<MGCurve> MGFSurface::outer_boundary_param ( ) const
pure virtual

Obtain boundary curves(parameter space representation) of the FSurface. Let the output of boundary() be wcurves and of boundary_parameter() be pcurves, then wcurves[i] corresponds to pcurves[i] one to one.

MGSurface, MGFaceで実装されています。

virtual std::ostream& MGFSurface::outFS ( std::ostream &  ostrm) const
pure virtual

Output virtual function.

MGSurface, MGFaceで実装されています。

virtual MGPosition MGFSurface::param ( const MGPosition P) const
pure virtual

Obtain parameter value of the FSurface whose world coordinates are P.

MGSurface, MGFace, MGPlaneで実装されています。

virtual double MGFSurface::param_e_u ( ) const
pure virtual

Return ending parameter value.

MGSurface, MGSBRep, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。

virtual double MGFSurface::param_e_v ( ) const
pure virtual
double MGFSurface::param_error ( ) const

Obtain parameter space error.

double MGFSurface::param_error_u ( ) const
double MGFSurface::param_error_v ( ) const
virtual MGPosition MGFSurface::param_mid ( ) const
virtual

Return parameter value of the middle point of the surface. The middle point is defined as the parameter (u,v) where u=(param_s_u()+param_e_u())/2, and v likewise.

MGSurfaceで再実装されています。

virtual MGBox MGFSurface::param_range ( ) const
pure virtual

パラメータ範囲を返す。 Return parameter range.

MGSurface, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。

virtual double MGFSurface::param_s_u ( ) const
pure virtual

Return starting parameter value of the base surface.

MGSurface, MGSBRep, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。

virtual double MGFSurface::param_s_v ( ) const
pure virtual
virtual MGPvector<MGCurve> MGFSurface::parameter_curves ( int  is_u,
double  x 
) const
pure virtual

Obtain parameter curves. In the case of MGSurface, parameter curve is only one. However, in the case of MGFace, number of parameter curves are more than one.

引数
is_uTrue(!=0) if x is u-value.(i.e. obtain u=const line)
xparameter value. u or v-value accordint to is_u.

MGSurface, MGFaceで実装されています。

virtual bool MGFSurface::perp_guess ( const MGPosition P,
const MGPosition uvguess,
MGPosition uv 
) const
pure virtual

Return the foot of the perpendicular straight line from P. Computation is done from the guess parameter value. Function's return value is whether point is obtained(true) or not(false).

引数
PPoint
uvguessguess parameter value of the shell
uvParameter value will be returned.

MGSurface, MGFaceで実装されています。

virtual bool MGFSurface::perp_guess ( const MGCurve curve,
const MGPosition uvguess,
double  tguess,
MGPosition uv,
double &  t 
) const
pure virtual

Compute perpendicular points of a curve and the FSurface, given guess starting paramter values. Function's return value is: perp_guess=true if perpendicular points obtained, perp_guess=false if perpendicular points not obtained,

引数
curvecurve.
uvguessGuess parameter value of the FSurface.
tguessGuess parameter value of the curve.
uvperpendicular point's parameter values of the shell
twill be output.

MGSurface, MGFaceで実装されています。

virtual int MGFSurface::perp_one ( const MGPosition P,
MGPosition uv 
) const
virtual

指定点から最も近い、垂線の足とパラメータ値を返す。 Return the foot of the perpendicular straight line from p that is nearest to point P. Function's return value is whether point is obtained(>0) or not(0)

引数
P指定点(point)
uvParameter value of the FSurface will be returned.
virtual int MGFSurface::perp_point ( const MGPosition p,
MGPosition uv,
const MGPosition uvguess = 0 
) const
pure virtual

指定点から最も近い、垂線の足とパラメータ値を返す。 Return the foot of the perpendicular straight line from p that is nearest to point p. Function's return value is whether point is obtained(1) or not(0)

引数
p指定点(point)
uvParameter value of the surFSurface will be returned.
uvguessguess parameter value of surFSurface

MGSurface, MGFace, MGPlane, MGSphere, MGCylinderで実装されています。

virtual MGPosition_list MGFSurface::perps ( const MGPosition P) const
pure virtual

Compute perpendicular points on the FSurface from a point P((x,y,z)). MGPosition uv in the MGPosition_list is: uv(0): u parameter, and uv(1): v parameter of the FSurface. Generally number of uv are more than one.

MGSurface, MGFace, MGPlane, MGSphere, MGCylinderで実装されています。

virtual int MGFSurface::project ( const MGCurve crv,
MGPvector< MGCurve > &  vec_crv_uv,
MGPvector< MGCurve > &  vec_crv,
const MGVector vec = mgNULL_VEC 
) const
virtual

与えられた曲線を自身に面直またはベクトル投影して曲線リストを求める。引数vecが与えられないとき、面直投影する。 投影曲線は面上のパラメータ曲線と3次元曲線としてそれぞれ順番に、vec_crv_uv, vec_crvに格納される。 uv曲線のトレランスはrc_zero()を、3次元曲線はline_zero()をそれぞれ使用している。 戻り値: 投影曲線の数: 投影曲線が求まった 0: 投影曲線が求まらなかった -1: 内部処理エラー -2: 収束処理エラー(収束しなかった) Obtain the projected curve of a curve onto the FSurface. The direction of the projection is along the vector vec if the vec is not NULL, and normal to the FSurface if the vec is NULL. Output of 'project' is two kind of curves: one is general world coordinate curves('vec_crv'), and the other is (u,v) curves of the parameter space of the FSurface(vec_crv_uv). vec_crv_uv.size() is equal to vec_crv.size(). Let the size be n, then (vec_crv_uv[i], vec_crv[i]) is one pair for 0<=i<n. Function's return value is: >=0: number of curves obtained, <0 : Some error detected.

引数
crvgiven curve.
vec_crv_uvProjected curve(surface parameter (u,v) representation) will be appended.
vec_crvProjected curve(world coordinate(x,y,z) representation) will be appended.
vecprojection vector, if vec = NULL then calculate perpendicular project.
virtual int MGFSurface::project ( const MGCurve crv,
MGPvector< MGCurve > &  vec_crv,
const MGVector vec = mgNULL_VEC 
) const
virtual

与えられた曲線を自身に面直またはベクトル投影して曲線リストを求める。引数vecが与えられないとき、面直投影する。 投影曲線は3次元曲線としてvec_crvに格納される。 uv曲線のトレランスはline_zero()を使用している。 戻り値: 投影曲線の数: 投影曲線が求まった 0: 投影曲線が求まらなかった -1: 内部処理エラー -2: 収束処理エラー(収束しなかった) Obtain the projected curve of a curve onto the FSurface. The direction of the projection is along the vector vec if the vec is not NULL, and normal to the FSurface if the vec is NULL. Output of 'project' is general world coordinate curves('vec_crv') Function's return value is: >=0: number of curves obtained, <0 : Some error detected.

引数
crvgiven curve.
vec_crvProjected curve(world coordinate(x,y,z) representation) will be appended.
vecif vec = NULL then calculate perpendicular project.

MGPlaneで再実装されています。

int MGFSurface::projectbyApproximateAsLBRep ( const MGCurve crv,
MGPvector< MGCurve > &  vec_crv_uv,
MGPvector< MGCurve > &  vec_crv,
const MGVector vec 
) const
protected
int MGFSurface::projectbyRemovKnots ( const MGCurve crv,
MGPvector< MGCurve > &  vec_crv_uv,
MGPvector< MGCurve > &  vec_crv,
const MGVector vec 
) const
protected
int MGFSurface::projNormal ( const MGCurve crv,
MGPvector< MGCurve > &  vec_crv_uv,
MGPvector< MGCurve > &  vec_crv 
) const
protected

カーブを折れで分割して行い、後で接続する

int MGFSurface::projVector ( const MGCurve crv,
MGPvector< MGCurve > &  vec_crv_uv,
MGPvector< MGCurve > &  vec_crv,
const MGVector vec 
) const
protected

カーブを折れで分割して行い、後で接続する

virtual MGPosition MGFSurface::range ( const MGPosition uv) const
pure virtual

Round the input parameter (u,v) of the FSurface to the nearest point of the FSurface parameter range.

MGSurface, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinderで実装されています。

void MGFSurface::shadeFS ( mgVBO vbo,
const MGDrawParam para,
mgVBO::ELEMENT_TARGET  target = mgVBO::SHADING 
) const

Shade the object in world coordinates.

virtual MGPvector<MGCurve> MGFSurface::skeleton ( int  density = 1) const
virtual

Obtain boundary and main parameter lines of the FSurface. skeleton includes boundary() and inner parameter lines. density indicates how many inner parameter lines are necessary for both u and v directions.

MGPlane, MGPlaneImageで再実装されています。

virtual MGPvector<MGCurve> MGFSurface::skeleton_at_knots ( ) const
virtual

Obtain all the parameter curves at knots of u and v knot vector.

MGPlaneで再実装されています。

virtual void MGFSurface::split ( double  param,
bool  is_u,
MGPvector< MGFSurface > &  surfaces 
) const
pure virtual

split this fsurface at the parameter param.

引数
paramparameter value of this fsurface. if is_u is true, param is u-value, else v-value.
is_uindicates if param is u or v of the surface parameter (u,v).
surfacessplitted surfaces will be output.

MGSurface, MGFace, MGPlaneで実装されています。

void MGFSurface::split ( const std::vector< const MGCurve * > &  splitters,
const MGVector dir,
MGPvector< MGFace > &  faces 
) const

split this fsurface with splitters. splitters are 3D (x,y,z) curves that may not lie on the surface.

void MGFSurface::split ( const MGPvector< MGCurve > &  splitters,
MGPvector< MGFace > &  faces 
) const

split this fsurface with splitters. splitters are 2D (u,v) surfaces's parameter curves.

virtual void MGFSurface::triangulate ( const MGDrawParam para,
MGCL::TL_DATA_KIND  dkind,
std::vector< mgTL2Triangles > &  trisVec 
) const
pure virtual

Triangulate this object(MGShell, MGFace, or MGSurface is the target).

MGSurface, MGFaceで実装されています。

void MGFSurface::trim ( const std::vector< const MGCurve * > &  trimmers,
const MGVector dir,
const MGPosition uv,
MGPvector< MGFace > &  faces 
) const

Trim this fsurface with trimmers. trimmers are 3D curves and will be projected onto this surface tword the direction dir. If dir is null vector, surface normal prjection will be performed. Trimming is so performed that the smallest region enclosed by trimmers that includes the surface point uv will be removed.

引数
trimmersTrimmer curves
dirtrimmers projection direction.
uvsurface parameter (u,v) that indicates the region to remove, The smallest region that inclued uv will be removed.
facesResult trimmed face(s) will be appended, If no trimming was performed, no faces will be appended.
virtual MGUnit_vector MGFSurface::unit_normal ( const MGPosition uv) const
pure virtual

Compute unit normal vector at uv.

MGSurface, MGFaceで実装されています。

virtual MGUnit_vector MGFSurface::unit_normal ( double  u,
double  v 
) const
pure virtual

Compute unit normal vector at (u,v).

MGSurface, MGFaceで実装されています。


このクラス詳解は次のファイルから抽出されました: