MGCL V10
V10
MGCL V10
|
MGFSurface is an abstract class to provide the comman interfaces to MGFace and MGSurface. [詳解]
公開メンバ関数 | |
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 MGBox & | get_box () const |
Get the box of the object. [詳解] | |
virtual const MGBox | box_param2 () const =0 |
virtual MGFSurface * | clone_fsurface () const =0 |
Get the clone of this MGFSurface. [詳解] | |
virtual MGFace * | clone_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< MGCurve > | get_all_boundaries (void) const |
Obtain all the boundaries(i.e., outer boundary and all the inner boundaries) [詳解] | |
virtual MGFace * | get_face_pointer ()=0 |
get face pointer if this is MGFace, else null will be returned. [詳解] | |
virtual const MGFace * | get_face_pointer () const =0 |
virtual int | get_number_of_boundaries () const =0 |
Get number of inner boundaries as the output of the function. [詳解] | |
virtual MGSurface * | get_surface_pointer ()=0 |
virtual const MGSurface * | get_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< MGCurve > | inner_boundary (int i) const =0 |
virtual MGPvector< MGCurve > | inner_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 MGKnotVector & | knot_vector_u () const =0 |
Returns the u knot vector. [詳解] | |
virtual MGKnotVector & | knot_vector_u ()=0 |
virtual const MGKnotVector & | knot_vector_v () const =0 |
Returns the v knot vector. [詳解] | |
virtual MGKnotVector & | knot_vector_v ()=0 |
virtual MGFace * | make_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 MGObject * | object_pointer () const =0 |
Get the object point of this MGFSurface. [詳解] | |
virtual MGObject * | object_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< MGCurve > | outer_boundary () const =0 |
virtual MGPvector< MGCurve > | outer_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< MGCurve > | parameter_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< MGCurve > | inner_skeleton (int density) const |
virtual MGPvector< MGCurve > | skeleton (int density=1) const |
virtual MGPvector< MGCurve > | skeleton_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 ¶, mgVBO::ELEMENT_TARGET target=mgVBO::SHADING) const |
Shade the object in world coordinates. [詳解] | |
virtual void | triangulate (const MGDrawParam ¶, 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 MGCurve * | isect_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.
|
inline |
Null FSurface.
|
inline |
Copy constructor.
|
inlinevirtual |
|
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.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Get the clone of this MGFSurface.
|
pure virtual |
Compute closest point from a point. Returned is the parameter value of the FSurface that is closest to point.
point | the target point. |
MGFace, MGPlane, MGSurface, MGSphere, MGCylinderで実装されています。
|
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.
sl | The target line. |
|
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.
vbo | The target graphic object. |
span_length | Line segment span length. |
line_density | line density to draw a surface in wire mode. |
void MGFSurface::drawWireFS_to_highlight | ( | mgVBO & | vbo, |
double | span_length, | ||
int | line_density | ||
) | const |
vbo | The target graphic object. |
span_length | Line segment span length. |
line_density | line density to draw a surface in wire mode. |
|
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.
u | FSurface parameter u of value(u,v) |
v | FSurface parameter v of value(u,v) |
ndu | Order of derivative along u. |
ndv | Order of derivative along v. |
MGSBRep, MGRSBRep, MGSurface, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
pure virtual |
uv | FSurface parameter value(u,v) |
ndu | Order of derivative along u. |
ndv | Order 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).
face2 | The target 2nd surface. |
uvuvs | the nearest points pairs are set. |
npoint | indicates how many discrete points be obtained. |
tolerance | tolerance 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.
trimmers | Trimmer curves |
dir | trimmers projection direction. |
uv | surface parameter (u,v) that indicates the region to extract. The smallest region that inclued uv will be extracted. |
eface | Result extracted face will be output. |
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.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Define curve division number when a curve crv be projected onto this MGFSurface. The result is used in prj2GetParamRange().
|
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.
|
pure virtual |
|
pure virtual |
|
inline |
Test if this FSurface has inner boundary loops or not. If this has one, return true.
|
inlinevirtual |
Test if this FSurface has boundary loops or not in the specified box. If this has one, return true.
MGFaceで再実装されています。
|
pure virtual |
Test if parameter value (u,v) is in the range of the FSurface parameter.
MGSBRep, MGSurface, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
pure virtual |
|
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.
|
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().
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().
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.
face2 | The second surface. |
uvuv_list | The 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. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
MGSBRep, MGSurface, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
pure virtual |
MGSBRep, MGSurface, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
protectedpure virtual |
isect_area_length() returns initial area length for the intersection line.
MGSurfaceで実装されています。
|
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.
face2 | The target 2nd face. |
uvuvs | id1 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. |
id1 | id indicator of uvuvs as above. |
|
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.
sf2 | Second surface for the intersection. |
m1 | id of uvuvS that indicates this surface's parameter position in uvuvS. (uvuvS(m1), uvuvS(m1+1))=(u,v) of this surface. |
uvuvS | start parameter (u,v) pair of this surface and sf2. |
du | Incremental value of the parameter kind of kdt will be output. |
dv | Right dt will be output according to the function's output =0,1. |
acuRatio | acuracy ratio. |
MGSurfaceで再実装されています。
|
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.
u | start parameter u of (u,v) of this surface. |
v | start parameter v of (u,v) of this surface. |
tangent | To indicate which direction isect line should march toward. |
du | Incremental value sign of the parameter kind of |
dv | isect_direction_with_direction. |
|
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.
|
protected |
isect_dt computes incremental values du and dv for the intersection computation at parameter position (u,v).
u | Surface parameter u of (u,v). |
v | v of (u,v). |
du | u incremental value is output. |
dv | v incremental value is output. |
acuRatio | acuracy ratio. |
|
protected |
isect_dt_coef provides coef of how fine parameter increment should be, given num of intersection points computed so far.
|
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.
crv | Curve. |
uvi | Input initial guess parameter value of the i.p. of the surface. |
ti | Input initial guess parameter value of the line. |
uv | Output parameter value obtained. |
t | Output parameter value obtained. |
|
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.
sl | Curve. |
uvi | Input initial guess parameter value of the i.p. of the surface. |
ti | Input initial guess parameter value of the line. |
uv | Output parameter value obtained. |
t | Output parameter value obtained. |
|
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.
crv | Curve |
uvi | Input initial guess parameter value of the i.p. of the surface. |
ti | Input initial guess parameter value of the line. |
uv | Output parameter value obtained. |
t | Output parameter value obtained. |
|
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.
crv | Curve |
uvi | Input initial guess parameter value of the i.p. of the surface. |
ti | Input initial guess parameter value of the line. |
uv | Output parameter value obtained. |
t | Output parameter value obtained. |
|
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.
sl | Straight line. |
ti | Initial guess parameter value of the straight. |
uvi | Input initial guess parameter value of the i.p. of the surface. |
t | Straight parameter obtained. |
uv | Surface parameter value obtained(u,v). |
|
protectedpure virtual |
"isect1_incr_pline" is a dedicated function of isect_start_incr, will get shortest parameter line necessary to compute intersection.
uv | last intersection point. |
kdt | Input if u=const v-parameter line or not. true:u=const, false:v=const. |
du | Incremental u parameter length. |
dv | Incremental v parameter length. |
u | next u value will be output |
v | next v value will be output |
incr | Incremental valuse of B-coef's id. |
MGSurfaceで実装されています。
|
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.
face2 | 2nd surface |
iid | Inner loop id of this face(from 0) |
uvuv_list | intersection 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. |
id1 | id 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. |
|
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).
n | num of i.p. obtained so far(not include uvnow). |
uvnow | intersection point obtained last(of this). |
du | Input u incremental value, |
dv | incremental length from previous to uvnow is input. New du or dv will be output according to kdt's return value. |
kdt | Parameter 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. |
acuRatio | Accurate ratio. |
MGSurfaceで再実装されています。
|
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.
face2 | 2nd surface |
uvuv_list | intersection points will be appended, One member in the list is of sdim 7, and the last three elements are the ip direction vector. |
id1 | id 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. |
|
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_startIn | Starting point of the intersection line. |
uvuv_list | isect_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. |
sf2 | 2nd surface. |
ssi | Surface-surface intersection line will be output. |
uvuv_id | When 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. |
m1 | id that indicates which surface was used as the main surface. m1=0: this surface, m1=2: sf2. |
|
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.
sf2 | 2nd surface b-rep. |
uvuv_pre | Starting parameter values of ip. |
kdt | kdt=true: u=const parameter line, else: v=const parameter line of this surface. |
du | Incremental u parameter length. |
dv | Incremental v parameter length. |
lid1 | id of parameter of this surface in uvuv_pre or uvuv_now. |
uvuv_now | New parameter values of ip will be output. |
|
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.
tau | data points |
line | the intersection line of this and sf2. |
sf2 | second surface. |
|
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.
sf2 | 2nd surface b-rep. |
uvuv_pre | Starting parameter values of ip. |
kdt | kdt=true: u=const parameter line, else: v=const parameter line of this surface. |
du | Incremental u parameter length. |
dv | Incremental v parameter length. |
lid1 | id of parameter of this surface in uvuv_pre or uvuv_now. |
uvuv_now | New parameter values of ip will be output. |
|
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.
uvuvS | Starting parameter value of the intersection. |
uvuv_list | isect_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. |
pl | Plane expression(2nd surface for the intersection). |
ssi | Surface-surface intersection line will be output. |
uvuv_id | When 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. |
|
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_startIn | Starting point of the intersection line. |
uvuv_list | isect_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. |
pl2 | 2nd surface(MGPlane). |
acuRatio | Accurate ratio, should be decreased by multiplyng .2 (or a number less than 1.). |
point | Surface-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_id | When 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. |
|
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_startIn | Starting point of the intersection line. |
uvuv_list | isect_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. |
sf2 | 2nd surface. |
acuRatio | Accurate ratio, should be decreased by multiplyng .2 (or a number less than 1.). |
point | Surface-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_id | When 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. |
m1 | id that indicates which surface was used as the main surface, m1=0: this surface, m1=2: sf2. |
|
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_list | Let 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. |
pl | Plane expression(2nd surface for the intersection). |
fsrf2 | Original FSurface before casting to plane. |
|
protected |
Compute the intersection lines of this surface and srf2(both are not planes).
uvuv_list | Let 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. |
srf2 | 2nd surface for the intersection. |
|
inlinevirtual |
Access to i-th element of u knot.
MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで再実装されています。
|
inlinevirtual |
Access to i-th element of v knot.
MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで再実装されています。
|
pure virtual |
Returns the u knot vector.
MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
pure virtual |
MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
pure virtual |
Returns the v knot vector.
MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
pure virtual |
MGSurface, MGSBRep, MGRSBRep, MGFace, MGPlane, MGSphere, MGCylinder, MGBSumSurfで実装されています。
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
Get number of inner boundaries as the output of the function.
MGFaceで再実装されています。
|
pure virtual |
Get the object point of this MGFSurface.
|
pure virtual |
|
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.
P | The target point. |
uv | Parameter 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で実装されています。
|
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.
u | Surface parameter u of (u,v) |
v | Surface parameter v of (u,v) |
perim_num | if function returns true, the perimete number is output. |
MGFace, MGSurface, MGPlane, MGCylinderで実装されています。
bool MGFSurface::operator< | ( | const MGFSurface & | f2 | ) | const |
Comparison operator.
|
inline |
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.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Return ending parameter value.
MGSurface, MGSBRep, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。
|
pure virtual |
MGSurface, MGSBRep, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。
double MGFSurface::param_error | ( | ) | const |
Obtain parameter space error.
double MGFSurface::param_error_u | ( | ) | const |
double MGFSurface::param_error_v | ( | ) | 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で再実装されています。
|
pure virtual |
パラメータ範囲を返す。 Return parameter range.
MGSurface, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。
|
pure virtual |
Return starting parameter value of the base surface.
MGSurface, MGSBRep, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。
|
pure virtual |
MGSurface, MGSBRep, MGFace, MGRSBRep, MGPlane, MGSphere, MGCylinder, MGBSumSurf, MGPlaneImageで実装されています。
|
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).
P | Point |
uvguess | guess parameter value of the shell |
uv | Parameter value will be returned. |
|
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,
curve | curve. |
uvguess | Guess parameter value of the FSurface. |
tguess | Guess parameter value of the curve. |
uv | perpendicular point's parameter values of the shell |
t | will be output. |
|
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) |
uv | Parameter value of the FSurface will be returned. |
|
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) |
uv | Parameter value of the surFSurface will be returned. |
uvguess | guess parameter value of surFSurface |
MGSurface, MGFace, MGPlane, MGSphere, MGCylinderで実装されています。
|
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 |
与えられた曲線を自身に面直またはベクトル投影して曲線リストを求める。引数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.
crv | given curve. |
vec_crv_uv | Projected curve(surface parameter (u,v) representation) will be appended. |
vec_crv | Projected curve(world coordinate(x,y,z) representation) will be appended. |
vec | projection vector, if vec = NULL then calculate perpendicular project. |
|
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.
crv | given curve. |
vec_crv | Projected curve(world coordinate(x,y,z) representation) will be appended. |
vec | if vec = NULL then calculate perpendicular project. |
MGPlaneで再実装されています。
|
protected |
|
protected |
|
protected |
カーブを折れで分割して行い、後で接続する
|
protected |
カーブを折れで分割して行い、後で接続する
|
pure virtual |
void MGFSurface::shadeFS | ( | mgVBO & | vbo, |
const MGDrawParam & | para, | ||
mgVBO::ELEMENT_TARGET | target = mgVBO::SHADING |
||
) | const |
Shade the object in world coordinates.
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で再実装されています。
Obtain all the parameter curves at knots of u and v knot vector.
MGPlaneで再実装されています。
|
pure virtual |
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.
|
pure virtual |
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.
trimmers | Trimmer curves |
dir | trimmers projection direction. |
uv | surface parameter (u,v) that indicates the region to remove, The smallest region that inclued uv will be removed. |
faces | Result trimmed face(s) will be appended, If no trimming was performed, no faces will be appended. |
|
pure virtual |
|
pure virtual |