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

MGLoop is a boundary of a face, a boundary of 2D manifold cell. [詳解]

MGLoop の継承関係図
MGBoundary MGComplex MGTopology MGObject MGAttribedGel MGGel

公開型

enum  LoopKind {
  UNDEFINED =-1, INACTIVE =0, PERIMITER_LOOP =1, OUTER_LOOP =2,
  INNER_LOOP =3, NETWORK =4
}
 
- 基底クラス MGComplex に属する継承公開型
typedef std::list< MGCellNB * > container_type
 
typedef container_type::iterator cellItr
 
typedef
container_type::const_iterator 
const_cellItr
 
typedef container_type::iterator pcellItr
 
typedef
container_type::const_iterator 
const_pcellItr
 
typedef container_type::iterator bcellItr
 
typedef
container_type::const_iterator 
const_bcellItr
 

公開メンバ関数

 MGLoop ()
 Void constructor. [詳解]
 
 MGLoop (MGEdge *edge)
 Construct a loop of one edge. [詳解]
 
 MGLoop (const MGLoop &loop2)
 Copy constructor. [詳解]
 
 MGLoop (const MGCurve &param_curve, const MGCurve &world_curve)
 
 MGLoop (const MGCurve &param_curve, const MGInterval &range1, const MGCurve &world_curve, const MGInterval &range2)
 
 MGLoop (std::auto_ptr< MGCurve > &param_curve, std::auto_ptr< MGCurve > &world_curve)
 
MGLoopoperator= (const MGGel &gel2)
 
MGLoopoperator= (const MGLoop &gel2)
 
MGLoopoperator+= (const MGVector &v)
 Object transformation. [詳解]
 
MGLoopoperator-= (const MGVector &v)
 
MGLoopoperator*= (double scale)
 
MGLoopoperator*= (const MGMatrix &mat)
 
MGLoopoperator*= (const MGTransf &tr)
 
bool operator< (const MGLoop &gel2) const
 
bool operator< (const MGComplex &gel2) const
 comparison [詳解]
 
bool operator< (const MGGel &gel2) const
 
bool active () const
 Test if this is active boundary. [詳解]
 
void append (MGEdge *edge)
 
void append_edge_from_crv (const MGSurface &srf, const MGCurve &wcrv, double &tLast, double terror, const std::vector< double > &pspan, int peri_num, bool orientation_is_opposite=false)
 
double area () const
 
bool both_end_on_perimeter (int &pid_s, int &pid_e, const MGFSurface *srf=0) const
 
MGLoopclone (MGCell &parent) const
 
MGLoopclone () const
 
MGLoopclone_without_binders (MGCell &parent) const
 
MGLoopclone_without_binders () const
 
bool closed () const
 Test if this is closed boundary. [詳解]
 
MGLEPoint closest (const MGPosition &P, double &distance) const
 
bool closest_world (const MGStraight &sl, MGLEPoint &closest, double &dist) const
 
int common (const MGLoop &loop2, std::vector< MGLEPoint > &pranges1, std::vector< double > &branges1, std::vector< MGLEPoint > &pranges2, std::vector< double > &branges2) const
 
double compute_area () const
 
void copy_boundary (const MGBoundary &loop)
 
void copy_boundary_without_binders (const MGBoundary &loop)
 Copy boundary data into this, but does not copy the binders. [詳解]
 
MGPvector< MGCurvecurves () const
 
MGPvector< MGCurvecurves_world () const
 
MGEdgeedge (int i)
 Return i-th edge pointer. [詳解]
 
const MGEdgeedge (int i) const
 
bool edge_exist () const
 Test if at least one edge is included in this loop. [詳解]
 
int edge_num (const MGEdge *e) const
 
MGPosition end_point () const
 
MGLEPoint end_LPoint () const
 
double error () const
 
MGVector eval (const MGLPoint &t, int nderi=0) const
 Evaluation of the loop at the point t. [詳解]
 
MGVector eval (int i, double t, int nderi=0) const
 Evaluation of the loop at i-th edge's parameter t. [詳解]
 
const MGFaceface () const
 
MGFaceface ()
 Return MGFace pointer if this MGGel is an MGFace, else return null. [詳解]
 
const MGEdgefirst_edge () const
 Return pointer of the first edge. [詳解]
 
MGEdgefirst_edge ()
 
int get_loop_id_in_face () const
 
int inside (double u, double v) const
 
int inside (const MGPosition &uv) const
 
long identify_type () const
 Return Object's type ID (TID) [詳解]
 
MGLCisect_vector isect (const MGCurve &param_curve) const
 
MGLCisect_vector isect (double error, const MGCurve &param_curve) const
 
std::vector< MGLEPointisect_1D (double f, int coordinate=0) const
 
MGLCisect_vector isect_with_endpoints (const MGCurve &param_curve) const
 
bool is_inactive (const MGFSurface *srf=0) const
 Test if this loop is inactive or not. [詳解]
 
bool is_inner_boundary (const MGFSurface *srf=0) const
 
bool is_outer_boundary (const MGFSurface *srf=0) const
 
bool is_perimeter_boundary (const MGFSurface *srf=0) const
 
bool is_network (const MGFSurface *srf=0) const
 Test if this loop is network. [詳解]
 
MGLLisect_vector isect (const MGLoop &loop2) const
 Compute intersections of two loops. [詳解]
 
void join (bool start, const MGLoop &loop2)
 
void join (bool start, MGLoop *loop2)
 
void join (bool start, std::auto_ptr< MGLoop > &loop2)
 
void join_C1_edges (int parameter_normalization=2)
 
const MGEdgelast_edge () const
 Return edge pointer of the last edge. [詳解]
 
MGEdgelast_edge ()
 
void make_close ()
 
bool make_vertex (const MGLEPoint &lp, MGEdge *&pre, MGEdge *&aft, MGPVertex **pvertex=0)
 
int manifold_dimension () const
 Get manifold dimension. [詳解]
 
bool merge_network (const MGCurve &param_curve, double error)
 
bool merge_trim (const MGCurve &param_curve)
 
bool merge_trim (const MGCurve &param_curve, const MGInterval &range1)
 
bool merge_trim (const MGCurve &param_curve, const MGCurve &world_curve)
 
bool merge_trim (const MGCurve &param_curve, const MGInterval &range1, const MGCurve &world_curve)
 
bool merge_trim (const MGLoop &loop2)
 
MGPosition mid_point () const
 
void negate ()
 
void negate_as_boundary (const MGCellNB *parent=0)
 
int number_of_edges () const
 Get the number of edge included. [詳解]
 
bool on_perimeter_end (int &pid_e, const MGFSurface *surf=0) const
 
bool on_perimeter_start (int &pid_s, const MGFSurface *surf=0) const
 
bool on_surface_perimeter (const MGFace &f) const
 Test if all the edges included are on a surface perimeter. [詳解]
 
std::ostream & out (std::ostream &) const
 Output function. [詳解]
 
void prepend (MGEdge *e)
 Prepend edge to the start of the loop. [詳解]
 
bool remove_pendent_edge (const MGFSurface &face)
 
void remove_garbage_edge (double error)
 
const MGSurfacesurface () const
 Obtain parent surface pointer. [詳解]
 
MGLEPoint start_LPoint () const
 
MGPosition start_point () const
 
std::vector< MGEdge * > subdivide (const std::vector< MGLEPoint > &ranges)
 
MGEdgesubdivide (MGLEPoint &le1, MGLEPoint &le2)
 
void trim (const MGLEPoint &t1, const MGLEPoint &t2)
 
void trim_end (const MGLEPoint &t1)
 Trim the loop. Result is from start to t1. [詳解]
 
void trim_start (const MGLEPoint &t1)
 Trim the loop. Result is from t1 to end. [詳解]
 
- 基底クラス MGBoundary に属する継承公開メンバ関数
 MGBoundary ()
 Void constructor. [詳解]
 
 MGBoundary (MGCellNB *pcell)
 Constructor of one parameter cell. [詳解]
 
 MGBoundary (std::list< MGCellNB * > &pcells)
 Constructor from list of member pcells. [詳解]
 
 MGBoundary (const MGBoundary &boundary)
 Boundary data pcells that constitute complex. [詳解]
 
virtual ~MGBoundary ()
 original boundary. [詳解]
 
virtual MGBoundaryoperator= (const MGBoundary &gel2)
 
MGUnit_vector direction_star (int i) const
 
bool empty ()
 
bool equal_direction (int i, const MGBoundary &bound2, int j) const
 
int number_of_pcells () const
 Obtain how many parameter cells are included in the boundary. [詳解]
 
void set_binder (int i, MGCellNB &binder) const
 
MGCellset_parent (MGCell &new_parent) const
 
const MGCellNBstar () const
 Get the star cell. [詳解]
 
MGCellNBstar ()
 
- 基底クラス MGComplex に属する継承公開メンバ関数
 MGComplex ()
 Void constructor. [詳解]
 
 MGComplex (const MGComplex &complex)
 
 MGComplex (const MGCellNB &cell)
 
 MGComplex (MGCellNB *cell)
 
virtual ~MGComplex ()
 
virtual MGComplexoperator= (const MGComplex &gel2)
 
MGComplex operator+ (const MGVector &v) const
 
MGComplex operator- (const MGVector &v) const
 
MGComplex operator* (double s) const
 
MGComplex operator* (const MGMatrix &mat) const
 
MGComplex operator* (const MGTransf &tr) const
 
MGComplex operator/ (double s) const
 
const_bcellItr bcell_begin () const
 Obtain first bcell iterator. [詳解]
 
bcellItr bcell_begin ()
 
const_bcellItr bcell_end () const
 Obtain end bcell iterator(next of the last bcell). [詳解]
 
bcellItr bcell_end ()
 
const MGCellNBbcelli (int i) const
 Obtain i-the pcell in the m_bcells sequence. MGCellNB version. [詳解]
 
MGCellNBbcelli (int i)
 
const_bcellItr bcellIterator (int i) const
 Obtain i-the pcell in the m_bcells sequence. MGCellNB version. [詳解]
 
bcellItr bcellIterator (int i)
 
bool bcell_exist () const
 Cehck if bcell exist. [詳解]
 
MGCellNBbinder (int i) const
 Obtain the binder of i-the pcell, may be null. [詳解]
 
std::vector< MGCellNB * > binders () const
 
const MGBoxbox () const
 Return the box of this complex. [詳解]
 
MGPosition center () const
 
void drawWire (mgVBO &vbo, double span_length, int line_density=1) const
 
virtual void drawWire_in_star (mgVBO &vbo, double span_length, int line_density=1) const
 
virtual void draw3DVertex (mgVBO &vbo) const
 
virtual void draw3DVertex_in_star (mgVBO &vbo) const
 
void erase_first_pcell ()
 
void erase_last_pcell ()
 erase first pcell. [詳解]
 
void erase_pcell (MGCellNB *pcell)
 erase last pcell. [詳解]
 
const MGCellNBfirst_pcell () const
 Get fisrt pcell pointer. [詳解]
 
MGCellNBfirst_pcell ()
 
bool includes (const MGCellNB *cell) const
 
const MGCellNBlast_pcell () const
 Get last pcell pointer. [詳解]
 
MGCellNBlast_pcell ()
 
int number_of_bcells () const
 count number of bcells of the complex [詳解]
 
int number_of_pcells () const
 count number of pcells of the complex [詳解]
 
const_pcellItr pcell_begin () const
 Obtain first pcell iterator. [詳解]
 
pcellItr pcell_begin ()
 
const_pcellItr pcell_end () const
 Obtain end pcell iterator(next of the last pcell). [詳解]
 
pcellItr pcell_end ()
 
const MGCellNBpcelli (int i) const
 Obtain i-the pcell. MGCellNB version. [詳解]
 
MGCellNBpcelli (int i)
 
const_pcellItr pcellIterator (int i) const
 Obtain i-th pcell iterator. [詳解]
 
pcellItr pcellIterator (int i)
 
bool pcell_exist () const
 Cehck if pcell exist. [詳解]
 
std::vector< MGCellNB * > pcells ()
 
std::vector< const MGCellNB * > pcells () const
 
MGPosition pick_closest (const MGStraight &sl) const
 
const MGCellNBstar () const
 
MGCellNBstar ()
 
- 基底クラス MGTopology に属する継承公開メンバ関数
 MGTopology ()
 Void constructor(初期化なしでオブジェクトを作成する。) [詳解]
 
 MGTopology (const MGTopology &topo)
 Copy constructor. [詳解]
 
virtual ~MGTopology ()
 
virtual MGTopologyoperator= (const MGTopology &gel2)
 
virtual MGisects intersection (const MGObject &obj2) const
 
virtual MGisects intersection (const MGCurve &obj2) const
 
virtual MGisects intersection (const MGFSurface &obj2) const
 
virtual MGisects intersection (const MGSurface &obj2) const
 
virtual MGisects intersection (const MGFace &obj2) const
 
virtual MGisects intersection (const MGShell &obj2) const
 
MGTopologytopology ()
 Return MGTopology pointer if this MGGel is an MGTopology, else return null. [詳解]
 
const MGTopologytopology () const
 
- 基底クラス MGObject に属する継承公開メンバ関数
 MGObject ()
 Void constructor(初期化なしでオブジェクトを作成する。) [詳解]
 
 MGObject (const MGObject &obj2)
 Copy constructor. [詳解]
 
virtual ~MGObject ()
 Virtual Destructor. [詳解]
 
virtual MGObjectoperator= (const MGObject &obj2)
 
MGAppearanceappearance ()
 
const MGAppearanceappearance () const
 
virtual void shade (mgVBO &vbo, const MGDrawParam &para, mgVBO::ELEMENT_TARGET target=mgVBO::SHADING) const
 Shade the object in world coordinates. [詳解]
 
MGAppearanceensure_appearance ()
 
virtual void make_display_list (MGCL::VIEWMODE vmode=MGCL::DONTCARE) const
 Make a display list of this gel. [詳解]
 
bool has_common (const MGObject &obj2) const
 
const MGObjectincludes_object () const
 Test if this gel includes an object. [詳解]
 
MGObjectincludes_object ()
 Test if this gel includes an object. [詳解]
 
virtual MGisects intersection (const MGPoint &obj2) const
 
void remove_appearance ()
 Remove the MGAppearance of this MGAttribedGel. [詳解]
 
virtual MGObjectobject ()
 Return MGObject pointer if this MGGel is an MGObject, else return null. [詳解]
 
virtual const MGObjectobject () const
 
virtual const MGFSurfacefsurface () const
 Get the MGFSurface pointer if this is MGSurface or MGFace. [詳解]
 
virtual MGFSurfacefsurface ()
 
void set_appearance (const MGAppearance &appr2)
 
virtual void transform (const MGVector &v)
 Transform the gel by the argument. [詳解]
 
virtual void transform (double scale)
 translation [詳解]
 
virtual void transform (const MGMatrix &mat)
 scaling. [詳解]
 
virtual void transform (const MGTransf &tr)
 matrix transformation. [詳解]
 
- 基底クラス MGAttribedGel に属する継承公開メンバ関数
 MGAttribedGel ()
 void constructor. [詳解]
 
 MGAttribedGel (const MGAttribedGel &gel2)
 copy constructor. [詳解]
 
virtual MGAttribedGeloperator= (const MGAttribedGel &gel2)
 
virtual ~MGAttribedGel ()
 
void copy_appearance (const MGAttribedGel &gel2)
 
mgVBOdlist_name () const
 
virtual bool displayList_is_made (MGCL::VIEWMODE vmode) const
 Judge if the display list for vmode is made or not. [詳解]
 
void deleteDlistName () const
 
virtual void drawAttrib (mgVBO &vbo, bool no_color=false) const
 Process of draw or render attributes. [詳解]
 
virtual void render_attribute () const
 
virtual int get_draw_attrib_mask () const
 Obtain attribute mask for glPushAttrib(). [詳解]
 
virtual int get_render_attrib_mask () const
 
int getVBOElementsNumber () const
 Get the number of elements of m_dlistName. [詳解]
 
int getVBOShaderElementsNumber () const
 Get the number of shading elements of m_dlistName. [詳解]
 
virtual bool no_display () const
 
void remove_GLattrib (long tid)
 Removed the attribute of specified type. [詳解]
 
virtual void set_GLattrib (MGGLAttrib *attr)
 
virtual void set_display ()
 Set this group as display or no display group. [詳解]
 
virtual void set_no_display ()
 
bool visible () const
 
void set_name (const MGName &newName)
 
const MGNameget_name () const
 
void set_color (const MGColor &newColor)
 
const MGColorget_color () const
 
void setDlistName (mgVBO *vbo=0) const
 
void setDirty (bool is_dirty) const
 Set dirty flag(s) of this VBO(m_dlistName). [詳解]
 
- 基底クラス MGGel に属する継承公開メンバ関数
virtual ~MGGel ()
 Virtual Destructor. [詳解]
 
virtual bool operator== (const MGGel &gel2) const
 Comparison. [詳解]
 
virtual bool operator!= (const MGGel &gel2) const
 
virtual bool operator> (const MGGel &gel2) const
 
virtual int out_to_IGES (MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
 
virtual MGAttribattrib ()
 Return MGAttrib pointer if this MGGel is an MGAttrib, else return null. [詳解]
 
virtual const MGAttribattrib () const
 
virtual MGGroupgroup ()
 Return MGGroup pointer if this MGGel is an MGGroup, else return null. [詳解]
 
virtual const MGGroupgroup () const
 
virtual MGGeometrygeometry ()
 Return MGGeometry pointer if this MGGel is an MGGeometry, else return null. [詳解]
 
virtual const MGGeometrygeometry () const
 
virtual MGPointpoint ()
 Return point pointer if this MGGel is an MGPoint, else return null. [詳解]
 
virtual const MGPointpoint () const
 
virtual MGCurvecurve ()
 Return curve pointer if this MGGel is an MGCurve, else return null. [詳解]
 
virtual const MGCurvecurve () const
 
virtual MGSurfacesurf ()
 Return MGSurface pointer if this MGGel is an MGSurface, else return null. [詳解]
 
virtual const MGSurfacesurf () const
 
virtual MGShellshell ()
 Return MGShell pointer if this MGGel is an MGShell, else return null. [詳解]
 
virtual const MGShellshell () const
 
std::string string_content () const
 
bool type_is (const MGAbstractGels &types) const
 
virtual void display_arrows (mgSysGL &sgl) const
 
virtual void display_break_points (mgSysGL &sgl) const
 
virtual void display_control_polygon (mgSysGL &sgl) const
 
virtual void display_curvatures (mgSysGL &sgl, double scale, int density, bool use_radius) const
 

限定公開メンバ関数

 MGLoop (std::list< MGCellNB * > boundaries)
 
 MGLoop (const MGLoop &loop, MGCellMap &cmap)
 
MGLoopclone (MGCell &parent, MGCellMap &cmap) const
 
MGLoopclone (MGCellMap &cmap) const
 
std::string whoami () const
 
void ReadMembers (MGIfstream &buf)
 Read Object's member data. [詳解]
 
void WriteMembers (MGOfstream &buf) const
 Write Object's Member Data. [詳解]
 
- 基底クラス MGBoundary に属する継承限定公開メンバ関数
 MGBoundary (const MGBoundary &boundary, MGCellMap &cmap)
 
void connect_bound (int i, MGBoundary *bound2, int j)
 
void disconnect (int i)
 
void free_binders ()
 
MGBoundaryset_boundary (const MGBoundary &gel2)
 
- 基底クラス MGComplex に属する継承限定公開メンバ関数
 MGComplex (std::list< MGCellNB * > &pcells)
 
 MGComplex (const MGComplex &complex, MGCellMap &cmap)
 Binder cells of the pcells in complex will be registered in cmap. [詳解]
 
cellItr append_bcell (MGCellNB *cell) const
 cellmap to register binder association. [詳解]
 
cellItr add_cell (MGCellNB *cell, bool pcell, cellItr loc)
 
cellItr append_pcell (MGCellNB *cell)
 Append a PCell to the end of pcell sequence. [詳解]
 
virtual void compute_box () const
 Compute the box from the scratch. [詳解]
 
void copy_without_binders (const MGComplex &comp)
 
void erase_all_elements ()
 
cellItr prepend_pcell (MGCellNB *cell)
 Prepend a PCell to the end of pcell sequence. [詳解]
 
MGComplexset_complex (const MGComplex &comp2)
 
- 基底クラス MGObject に属する継承限定公開メンバ関数
MGObjectset_object (const MGObject &gel2)
 

フレンド

MG_DLL_DECLR friend MGEdgeedge_from_iterator (pcellItr i)
 Get edge pointer from its iterator in MGComplex of MGBoudarynD. [詳解]
 
MG_DLL_DECLR friend const MGEdgeedge_from_iterator (const_pcellItr i)
 
MG_DLL_DECLR friend MGVector eval (const MGLEPoint &t, int nderi=0)
 Evaluation of the loop at the point t. [詳解]
 
MG_DLL_DECLR friend int inside_outer_loop (const MGPosition &uv, const std::vector< const MGLoop * > &loop, const MGSurface *surf=0)
 Test if (u,v) is inside the outer boundary(of std::vector<MGLoop*>& boundaries). [詳解]
 

その他の継承メンバ

- 基底クラス MGBoundary に属する継承限定公開変数類
MGCellm_parent_cell
 Cell that has this boundary as a boundary. [詳解]
 
- 基底クラス MGComplex に属する継承限定公開変数類
MGBox m_box
 
- 基底クラス MGAttribedGel に属する継承限定公開変数類
std::auto_ptr< mgVBOm_dlistName
 display name if m_dlistName!=0; [詳解]
 

詳解

MGLoop is a boundary of a face, a boundary of 2D manifold cell.

MGLoop accepts parameter space curve and world space curve of of a boundary curve, and constructs a boundary of a face from the two types of curves. Input curves direction indicate which part of the face will be target part after trimed by the boundary. In 2D space (u,v) of the parameter space, LEFT side of the parameter curve along the curve's direction is the target part of face.

構築子と解体子

MGLoop::MGLoop ( )

Void constructor.

MGLoop::MGLoop ( MGEdge edge)
explicit

Construct a loop of one edge.

MGLoop::MGLoop ( const MGLoop loop2)

Copy constructor.

MGLoop::MGLoop ( const MGCurve param_curve,
const MGCurve world_curve 
)

Construct a Loop of one edge of one curve cell. param_curve is parameter space representation of the face of which this loop will be a boundary, will make parameter cell. world_curve is world coordinate representation of the face of which this loop will be a boundary, will make binder cell. range1 is parameter range of the curve param_curve, range2 is parameter range of the curve world_curve. When range1,2 are not specified, the start and the end of the curve are treated as their ranges. ***param_curve and world_curve must have the same direction.

MGLoop::MGLoop ( const MGCurve param_curve,
const MGInterval range1,
const MGCurve world_curve,
const MGInterval range2 
)
MGLoop::MGLoop ( std::auto_ptr< MGCurve > &  param_curve,
std::auto_ptr< MGCurve > &  world_curve 
)
MGLoop::MGLoop ( std::list< MGCellNB * >  boundaries)
protected

Fundamental constructor. Construct from boundary complex(i.e. MGLoop). This constructor takes the ownership of MGCell* in boundary.

引数
boundariesBoundary data of the super class MGBoundary.
MGLoop::MGLoop ( const MGLoop loop,
MGCellMap &  cmap 
)
protected

Copy constructor with mapping. Binder cells of the pcells in loop will be registered in cmap

引数
looporiginal Loop.
cmapcellmap to register binder association.

関数詳解

bool MGLoop::active ( ) const
virtual

Test if this is active boundary.

MGBoundaryを実装しています。

void MGLoop::append ( MGEdge edge)

Append edge to the end of loop. "append" connects the edge's start to the end of the loop.

void MGLoop::append_edge_from_crv ( const MGSurface srf,
const MGCurve wcrv,
double &  tLast,
double  terror,
const std::vector< double > &  pspan,
int  peri_num,
bool  orientation_is_opposite = false 
)

Build one edge of srf from the curve wcrv on srf and common information pspan and peri_num, which are a perimeter peri_num's parameter spans(psapn). wcrv must not be a MGCompositeCurve. One edge is generated and append to this loop.

引数
srfThe target surface.
wcrvcurve of world coordinates on this face that may coincide to a perimeter of the surface of this face.
tLastwcrv's parameter value to start is input and the end param value of the last edge generated will be output.
terrorwcrv's parameter space error.
pspancommon parameter value of a perimeter peri_num.
peri_numpspan and peri_num are output of getPerimeterCommon(). Refer to it.
orientation_is_oppositeorientation flag of wcrv to edge. True if opposite.
double MGLoop::area ( ) const

Compute curvilinear integral of the parameter space of the area sorrounded by the loop.

bool MGLoop::both_end_on_perimeter ( int &  pid_s,
int &  pid_e,
const MGFSurface srf = 0 
) const

Test if loop is a perimeter boundary or not. If yes, get the perimeter ids. pid_s, e are valid only when both_end_on_perimeter() is true, contain perimeter numbers of the start or end of the loop.

MGLoop* MGLoop::clone ( MGCell parent) const
virtual

Make a clone. Output is a newed object, must be deleted by calling program.

MGBoundaryを実装しています。

MGLoop* MGLoop::clone ( ) const
virtual

Construct new object by copying to newed area. User must delete this copied object by "delete".

MGBoundaryを実装しています。

MGLoop* MGLoop::clone ( MGCell parent,
MGCellMap &  cmap 
) const
protectedvirtual

Make a clone. The forms that have cmap as an argumetnt is to register binder association. Returned is pointer of newed object, must be deleted. When parent is specified, clone's parent is set to the parent.

MGBoundaryを実装しています。

MGLoop* MGLoop::clone ( MGCellMap &  cmap) const
protectedvirtual

MGBoundaryを実装しています。

MGLoop* MGLoop::clone_without_binders ( MGCell parent) const
virtual

Make a clone that has not binders. Output is a newed object, must be deleted by calling program.

MGBoundaryを実装しています。

MGLoop* MGLoop::clone_without_binders ( ) const
virtual

MGBoundaryを実装しています。

bool MGLoop::closed ( ) const
virtual

Test if this is closed boundary.

MGBoundaryを実装しています。

MGLEPoint MGLoop::closest ( const MGPosition P,
double &  distance 
) const

Compute closest point from the point P to this loop. Returned is the loop's point, and distance is the length of distance between P and MGLEPoint. All the coordinate values are of parameter space of the face's surface.

bool MGLoop::closest_world ( const MGStraight sl,
MGLEPoint closest,
double &  dist 
) const

Compute closest point closest(P in the world) of the loop(MGLEPoint) from the straight sl to this loop's world coordinate rep. The function's return value is true: if a point whose distance is smaller than dist is found, false: if not. Returned to closest is the loop's point, and the distance between P and MGLEPoint's world rep is set into dist if found. The coordinates of P are of world coordinate space of the loops world coordinate rep. This must be a boundary of a surface(that is, face() must not be null.

int MGLoop::common ( const MGLoop loop2,
std::vector< MGLEPoint > &  pranges1,
std::vector< double > &  branges1,
std::vector< MGLEPoint > &  pranges2,
std::vector< double > &  branges2 
) const

Compute common range of two loops, this and loop2. Function's return value is number of ranges obtained. In variable ranges, common ranges are output as: Let n be output of the function, then ranges1.size()=ranges2.size()=2*n. ranges1[2*i+0] and ranges1[2*i+1] are parameter values of this loop, and ranges2[2*i+0] and ranges2[2*i+1] are parameter values of loop2. Although ranges1[2*i+0] < ranges1[2*i+1] always holds, ranges2[2*i+0] < ranges2[2*i+1], or ranges2[2*i+0] > ranges2[2*i+1]. Let f1() be this loop, and f2() be loop2, then f1(ranges1[j]) and f2(ranges2[j]) represent the same point in star Face world for 0<=j<n*2 . This and loop2 must have each star faces.

double MGLoop::compute_area ( ) const

Compute curvilinear integral of the loop. Computation is done in the parameter space of the face.

void MGLoop::copy_boundary ( const MGBoundary loop)
virtual

Copy loop data into this. This boundary data is cleared and loop's boundary is copied into this.

MGBoundaryを再実装しています。

void MGLoop::copy_boundary_without_binders ( const MGBoundary loop)
virtual

Copy boundary data into this, but does not copy the binders.

MGBoundaryを再実装しています。

MGPvector<MGCurve> MGLoop::curves ( ) const

Obtain vector of curves(TrimmedCurve) of the loop. The curves are of parameter space expression. Let crvs be the output of curves() and wcrvs of curves_world(), then crvs[i] corresponds to wcrvs[i] one by one.

MGPvector<MGCurve> MGLoop::curves_world ( ) const

Obtain vector of curves(world coordinate expression) of the loop. Output curves are MGTrimmedCurve of edge's binders. When some of the edges do not have binders, they will be created. Let crvs be the output of curves() and wcrvs of curves_world(), then crvs[i] corresponds to wcrvs[i] one by one.

MGEdge* MGLoop::edge ( int  i)

Return i-th edge pointer.

const MGEdge* MGLoop::edge ( int  i) const
bool MGLoop::edge_exist ( ) const
inline

Test if at least one edge is included in this loop.

int MGLoop::edge_num ( const MGEdge e) const

Get edge number in this loop. If e is not a member of this loop, 0 will be returned.

MGLEPoint MGLoop::end_LPoint ( ) const

Return end point of this loop as MGLEPoint. loop must include at least one edge, or this output is undefined.

MGPosition MGLoop::end_point ( ) const

Return end point of this loop as MGPosition. The point is of parameter space.

double MGLoop::error ( ) const

Get error of this loop. This is obtained from the parent surface. If parent surface did not exist, error=the box of the loop by relative zero.

MGVector MGLoop::eval ( const MGLPoint t,
int  nderi = 0 
) const

Evaluation of the loop at the point t.

MGVector MGLoop::eval ( int  i,
double  t,
int  nderi = 0 
) const

Evaluation of the loop at i-th edge's parameter t.

const MGFace* MGLoop::face ( ) const
virtual

Return pointer of the face. If the loop is not a boundary of any face, null will be returned.

MGGelを再実装しています。

MGFace* MGLoop::face ( )
virtual

Return MGFace pointer if this MGGel is an MGFace, else return null.

MGGelを再実装しています。

const MGEdge* MGLoop::first_edge ( ) const

Return pointer of the first edge.

MGEdge* MGLoop::first_edge ( )
int MGLoop::get_loop_id_in_face ( ) const

Get the loop id of this loop in the star face baoundary. Let face=face(), then face->loop(get_loop_id_in_face())=this; When this does not have star face, or this is not a boundary of a face, -1 will be returned.

long MGLoop::identify_type ( ) const
virtual

Return Object's type ID (TID)

MGBoundaryを実装しています。

int MGLoop::inside ( double  u,
double  v 
) const

Test if parameter value (u,v) is inside this loop or not. inside means inside face, that is, if the loop is inner, outside inner loops and if the loop is outer boundary loop, inside the outer boundary loop. This can be used for perimeter boundary loops. Returned is: 0:outside(not on the loop) 1:unknown 2:inside(not on the loop) otherwise:on the loop(int(parameter edge id +100))will be returned.

int MGLoop::inside ( const MGPosition uv) const
bool MGLoop::is_inactive ( const MGFSurface srf = 0) const

Test if this loop is inactive or not.

bool MGLoop::is_inner_boundary ( const MGFSurface srf = 0) const

Test if this loop is inner boundary. Inner boundary is: (1) closed loop. (2) the direction is clockwise.

bool MGLoop::is_network ( const MGFSurface srf = 0) const
inline

Test if this loop is network.

bool MGLoop::is_outer_boundary ( const MGFSurface srf = 0) const

Test if this loop is outer boundary. outer boundary is: (1) closed loop. (2) the direction is anti-clockwise.

bool MGLoop::is_perimeter_boundary ( const MGFSurface srf = 0) const

Test if this loop is perimeter boundary. Perimeter boundary is: both ends are on the surface perimeter.

MGLCisect_vector MGLoop::isect ( const MGCurve param_curve) const

Compute intersections of this loop(parameter rep of a face) and param_curve.

MGLCisect_vector MGLoop::isect ( double  error,
const MGCurve param_curve 
) const

Compute intersections of this loop(parameter rep of a face) and param_curve.

MGLLisect_vector MGLoop::isect ( const MGLoop loop2) const

Compute intersections of two loops.

std::vector<MGLEPoint> MGLoop::isect_1D ( double  f,
int  coordinate = 0 
) const

Compute intersection points of 1D sub curves of the original loop. Parameter values of intersection points(MGLEPoint's) will be returned.

引数
fCoordinate value
coordinateCoordinate kind of the data f(from 0).
MGLCisect_vector MGLoop::isect_with_endpoints ( const MGCurve param_curve) const

Compute intersections of this loop(parameter rep of the face) and param_curve. isect_with_endpoints() includes endpoints of both if they are close enough (within tolerance).

void MGLoop::join ( bool  start,
const MGLoop loop2 
)

Join two loops. start indicates which end of this loop loop2 should be connected to. start=true: connect start of this and loop2's end. start=false: connect end of this and loop2's start. The 2nd form takes the ownership of loop2, will delete loop2.

void MGLoop::join ( bool  start,
MGLoop loop2 
)
void MGLoop::join ( bool  start,
std::auto_ptr< MGLoop > &  loop2 
)
void MGLoop::join_C1_edges ( int  parameter_normalization = 2)

Join adjacent two C1 continuous edges to one edge. When the number of edges is equal to or less than 4, join is not executed.

引数
parameter_normalizationSpecify how rebuilt edes's parameterization be done.
const MGEdge* MGLoop::last_edge ( ) const

Return edge pointer of the last edge.

MGEdge* MGLoop::last_edge ( )
void MGLoop::make_close ( )

Make this loop as closed. This loop's 1st edge's start point must be the same as the last edge's end point. However, this is not tested in make_close.

bool MGLoop::make_vertex ( const MGLEPoint lp,
MGEdge *&  pre,
MGEdge *&  aft,
MGPVertex **  pvertex = 0 
)

Make a vertex at lp and subdivide the edge into two edges. Returned is true if subdivision is done and false if no subdivision is done since lp was one of existed vertex. When function's return value is true, pre is always the same edge as lp's edge and the iterator is unchanged.

引数
lppoint to subdivide of this loop.
prepre and aft-edge of the lp will be output
aftafter make_vertex's execution, may be null.
pvertexMGPVertex of the made vertex which is the boundary of lp.
int MGLoop::manifold_dimension ( ) const
inlinevirtual

Get manifold dimension.

MGBoundaryを実装しています。

bool MGLoop::merge_network ( const MGCurve param_curve,
double  error 
)

Merge with param_curve as a network loop. Function's return value is: true: merge is done and param_curve is processed into this loop as a network. false: merge is not performed since no intersection with this loop were found. When false is returned, this loop does not have the input param_curve information as an edge information. This loop must not be empty loop, ant the kind is always changed to NETWORK.

引数
param_curveCurve to merge.
errorError to judge two param_curve' points are equal.
bool MGLoop::merge_trim ( const MGCurve param_curve)

Merge loop2 or param_curve to the existing loop data, and build a loop. Returned is if merge was done(true) or not(false). When no intersection was found, merge is not executed. param_curve is parameter space representation of the face of which this loop will be a boundary, will make parameter cell. world_curve is world coordinate representation of the face of which this loop will be a boundary, will make binder cell. range1 is parameter range of the curve param_curve. When world_curve is input, it will be trimmed accordin to the range of param_curve. param_curve and world_curve may be opposite direction. When more than one closed loops are detected, first one from the old loop start point is employed, and other loops are discarded.

bool MGLoop::merge_trim ( const MGCurve param_curve,
const MGInterval range1 
)
bool MGLoop::merge_trim ( const MGCurve param_curve,
const MGCurve world_curve 
)
bool MGLoop::merge_trim ( const MGCurve param_curve,
const MGInterval range1,
const MGCurve world_curve 
)
bool MGLoop::merge_trim ( const MGLoop loop2)
MGPosition MGLoop::mid_point ( ) const

Compute the mid point of this loop. Mid point is the point of the mid point of m-th edge, where m=number_edges()/2.

void MGLoop::negate ( )
virtual

Reverse the direction of the boundary. (Coordinate transformation is not performed.)

MGBoundaryを再実装しています。

void MGLoop::negate_as_boundary ( const MGCellNB parent = 0)
virtual

Negate the boundary according to the parent cell negation. That is,

  1. Transform the coordinates of the bondary cell. (This transfromation depends on how the parent cell is transformed when negate() is invoked. So, the member cells of this boundary are transformed by negate_transoform of the parent cell.)
  2. Reverse the direction of the parameter cells(negate each cell).
  3. Reverse the ordering of the parameter cells.
  4. Negate the binders.

MGBoundaryを再実装しています。

int MGLoop::number_of_edges ( ) const
inline

Get the number of edge included.

bool MGLoop::on_perimeter_end ( int &  pid_e,
const MGFSurface surf = 0 
) const

Test if start or end point of the loop is on perimeter of the surface. Returned is true when on perimeter, false if not. When on perimeter, perimeter number of the surface is returned in pid_x.

bool MGLoop::on_perimeter_start ( int &  pid_s,
const MGFSurface surf = 0 
) const
bool MGLoop::on_surface_perimeter ( const MGFace f) const

Test if all the edges included are on a surface perimeter.

MGLoop& MGLoop::operator*= ( double  scale)
virtual

MGBoundaryを再実装しています。

MGLoop& MGLoop::operator*= ( const MGMatrix mat)
virtual

MGBoundaryを再実装しています。

MGLoop& MGLoop::operator*= ( const MGTransf tr)
virtual

MGBoundaryを再実装しています。

MGLoop& MGLoop::operator+= ( const MGVector v)
virtual

Object transformation.

MGBoundaryを再実装しています。

MGLoop& MGLoop::operator-= ( const MGVector v)
virtual

MGBoundaryを再実装しています。

bool MGLoop::operator< ( const MGLoop gel2) const

This operator is to sort loops in the order:

  1. Perimeter boundary.
  2. Outer boundary.
  3. Inner boundary.
  4. Inactive loop.
bool MGLoop::operator< ( const MGComplex gel2) const
virtual

comparison

MGComplexを再実装しています。

bool MGLoop::operator< ( const MGGel gel2) const
virtual

MGComplexを再実装しています。

MGLoop& MGLoop::operator= ( const MGGel gel2)
virtual

Assignment. When the leaf object of this and bnd2 are not equal, this assignment does nothing.

MGComplexを再実装しています。

MGLoop& MGLoop::operator= ( const MGLoop gel2)
std::ostream& MGLoop::out ( std::ostream &  ) const
virtual

Output function.

MGBoundaryを再実装しています。

void MGLoop::prepend ( MGEdge e)

Prepend edge to the start of the loop.

void MGLoop::ReadMembers ( MGIfstream buf)
protectedvirtual

Read Object's member data.

MGBoundaryを再実装しています。

void MGLoop::remove_garbage_edge ( double  error)

Remove garbage edge. Error is the parameter error allowed of the edge length to judge removal.

bool MGLoop::remove_pendent_edge ( const MGFSurface face)

Remove pendent edge. Function's return value is true if an edge was removed.

MGLEPoint MGLoop::start_LPoint ( ) const

Return start point of this loop as MGLEPoint. loop must include at least one edge, or this output is undefined.

MGPosition MGLoop::start_point ( ) const

Return start point of this loop as MGPosition. The point is of parameter space.

std::vector<MGEdge*> MGLoop::subdivide ( const std::vector< MGLEPoint > &  ranges)

Subdivide this loop so that one parameter range in ranges becomes one edge. In ranges, parameter range of this loop is stored as: Let n=ranges.size()/2, then span from ranges[2*i] to ranges[2*i+1] is one parameter span that is supposed to be one edge for 0<=i<n. Returned are new edge pointers that correspond to ranges[2*i] to ranges[2*i+1] after subdivided for 0<=i<n. ****Currently this does not conform to non_manifold model. That is, this loop must not have partner edges already.

MGEdge* MGLoop::subdivide ( MGLEPoint le1,
MGLEPoint le2 
)

Subdivide this loop so that one parameter range from le1 to le2 becomes one edge. le1, and 2 must be of the same edge. new edge between le1 and le2 will be output.

const MGSurface* MGLoop::surface ( ) const

Obtain parent surface pointer.

void MGLoop::trim ( const MGLEPoint t1,
const MGLEPoint t2 
)

Trim the loop. Result loop is from t1 to t2; The loop can be closed one. In this case, t1 can be >t2. When not closed, t1 must be less than t2.

void MGLoop::trim_end ( const MGLEPoint t1)

Trim the loop. Result is from start to t1.

void MGLoop::trim_start ( const MGLEPoint t1)

Trim the loop. Result is from t1 to end.

std::string MGLoop::whoami ( ) const
inlineprotectedvirtual

MGBoundaryを再実装しています。

void MGLoop::WriteMembers ( MGOfstream buf) const
protectedvirtual

Write Object's Member Data.

MGBoundaryを再実装しています。

フレンドと関連関数の詳解

MG_DLL_DECLR friend MGEdge* edge_from_iterator ( pcellItr  i)
friend

Get edge pointer from its iterator in MGComplex of MGBoudarynD.

MG_DLL_DECLR friend const MGEdge* edge_from_iterator ( const_pcellItr  i)
friend
MG_DLL_DECLR friend MGVector eval ( const MGLEPoint t,
int  nderi = 0 
)
friend

Evaluation of the loop at the point t.

When nderi=0, get a parameter (u,v) of the surface at the boundary point.

MG_DLL_DECLR friend int inside_outer_loop ( const MGPosition uv,
const std::vector< const MGLoop * > &  loop,
const MGSurface surf = 0 
)
friend

Test if (u,v) is inside the outer boundary(of std::vector<MGLoop*>& boundaries).

Inside the outer boundary means that inside outer_boudary_param() or not. This must not be used for faces that do not have perimeter or outer boundary loop. Function's return value is: 0:outside the outer boundary(not on a loop) 1:unknown 2:inside the outer boundary(not on a loop) otherwise:on the outer boundary loop


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