9 #include "mg/TrimmedCurve.h"
10 #include "topo/Complex.h"
11 #include "topo/CellNB.h"
47 MGEdge(
const MGEdge& e,
bool copy_boundary=
true,
bool no_binder=
false);
120 MGEdge operator/ (
double s)
const{
return (*
this)*(1./s);};
137 std::ostream&
out(std::ostream& ostrm)
const;
147 const MGEdge* aft_edge(
bool at_end=
true,
int* vertexID=0)
const;
148 MGEdge* aft_edge(
bool at_end=
true,
int* vertexID=0);
152 MGEdge* binder_edge()
const;
191 void compute_continuity(
209 void connect_at_id(
int id1,
MGEdge* e2,
int id2);
221 const MGCurve* base_curve()
const;
228 MGCurve* curve_limitted()
const;
231 void delete_binder_edge();
235 void disconnect_at_id(
int id);
281 bool equal_direction_to_binder()
const;
288 const MGEdge* first_partner()
const;
291 void free_end_neighbourhood();
299 void free_start_neighbourhood();
307 bool is_connected_and_same_direction(
313 bool is_end_point(
double t)
const;
316 bool is_start_point(
double t)
const;
326 void join(
bool start,
MGEdge* e2);
329 const MGLoop* loop()
const;
342 MGEdge* make_binder_with_curve()
const;
348 const MGEdge* member_partner_edge(
int i)
const;
360 std::vector<const MGCellNB*>
neighbours()
const;
377 double param_bcell(
double tp,
const double* guess=0)
const;
387 double param_pcell(
double tb,
const double* guess=0)
const;
390 double param_e()
const;
393 double param_s()
const;
404 std::vector<const MGEdge*> partner_edges()
const;
422 void polygonize(
double error);
426 const MGEdge* pre_edge(
bool at_start=
true)
const;
427 MGEdge* pre_edge(
bool at_start=
true);
451 void set_end(
double t);
455 void set_start(
double t);
459 void set_only_param_range(
double ts,
double te);
463 void set_i_th_binder(
int i,
MGBVertex& binder)
const;
475 int surface_perimeter()
const;
476 int surface_perimeter(
const MGSurface& sf)
const;
477 int surface_perimeter(
const MGFace& face)
const;
500 const MGCurve* world_curve()
const;
502 std::string
whoami()
const{
return "Edge";};
518 mutable double m_perror;
519 mutable int m_equal_to_binder;
525 void bn_binder_tr(
const MGVector& v);
526 void bn_binder_tr(
double s);
527 void bn_binder_tr(
const MGMatrix& mat);
528 void bn_binder_tr(
const MGTransf& tr);
534 void set_box_as_null()
const;
546 void compute_continuity2(
556 void copy_all_boundaries(
const MGCellBase& cellin);
561 void copy_all_boundaries(
const MGCellBase& cellin, MGCellMap& cmap);
564 void copy_box(
const MGCellBase& cellin)
const;
567 void copy_perror(
const MGCellBase& cellin)
const;
571 void get_all_boundary_binders(std::vector<MGCellNB*>& cvec)
const;
586 void make_extent()
const;
589 void negate_boundary();
594 void trim(
double t,
bool start);
CellNB is a cell without boundaries(No Boundaries).
Definition: CellNB.h:38
MGBVertex is 0 manifold dimension binder cell, is an point.
Definition: BVertex.h:30
Is an abstract class and the super class of MGPVertex and MGCellNB.
Definition: CellBase.h:38
virtual void WriteMembers(MGOfstream &buf) const
Write Object's Member Data.
MGTrimmedCurve is a part of an original curve of a limitted parameter range.
Definition: TrimmedCurve.h:50
bool active_end() const
Test if active at start or end.
Definition: Edge.h:142
virtual void free_neighbourhood(int i, int j=0)=0
Free neighbourhood relation at j-th boundary's i-th pcell of this cell.
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
virtual MGFace * face()
Return MGFace pointer if this MGGel is an MGFace, else return null.
Definition: Gel.h:151
MGPVertex * vertex_start()
Definition: Edge.h:493
bool is_free() const
Definition: Edge.h:320
const MGPVertex * vertex_end() const
Definition: Edge.h:491
virtual bool operator<(const MGGel &gel2) const
virtual long identify_type() const =0
Return Object's type ID (TID)
container_type::const_iterator const_pcellItr
Definition: Complex.h:34
const MGBox & box() const =0
Obtain the box of the cell.
void connect_at_start(MGPVertex &pvert)
Connect the start of this to the pvert's edge at pvert.
Definition: Edge.h:212
MGPosition start_point() const
Obtain the end point of the edge.
Definition: Edge.h:471
virtual MGCellNB & operator=(const MGCellNB &gel2)
virtual void compute_box() const =0
compute box of the cell in m_box.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual void negate()
Negate the direction of the cell.
virtual void drawWire(mgVBO &vbo, double span_length, int line_density=1) const =0
bool on_surface_perimeter(const MGSurface &sf) const
Definition: Edge.h:365
void trim_start(double t)
Trim the loop. Result is from t1 to end.
Definition: Edge.h:483
bool on_surface_perimeter() const
Test if the edge is a part of a surface perimeter.
Definition: Edge.h:363
int manifold_dimension() const
Obtain manifold dimension.
Definition: Edge.h:345
Vector of a general n space dimension.
Definition: Vector.h:26
virtual void connect(MGCellBase &cell2)
virtual std::ostream & out(std::ostream &) const
Output virtual function.
int number_of_partners() const
MGGeometry is an abstract class which represents a whole geometry.
Definition: Geometry.h:36
virtual MGCellNB * clone_without_boundaries() const =0
virtual double parameter_error() const =0
Return parameter space error of the cell.
Defines a Box of any space dimendion.
Definition: Box.h:34
MGFace is a trimmed surface.
Definition: Face.h:51
virtual MGPosition pick_closest(const MGStraight &sl) const
Definition: Object.h:146
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
MGEdge is an instance of MGCellNB, represents a boundary element of 2D manifold.
Definition: Edge.h:33
bool on_surface_perimeter(const MGFace &f) const
Definition: Edge.h:364
MGStraight is a curve of any space dimension, represent a straight line.
Definition: Straight.h:49
bool operator!=(const MGGel &gel2) const
Definition: Edge.h:127
Interval of 1 dimension, i.e. MGInterval is a real line.
Definition: Interval.h:22
MG_DLL_DECLR MGVector operator*(const MGVector &v, const MGMatrix &m)
Represent a positional data.
Definition: Position.h:28
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
bool operator!=(const MGEdge &gel2) const
Definition: Edge.h:128
const MGPVertex * vertex(int id) const
Get the vertex at the start or end.
Definition: Edge.h:489
MGLoop is a boundary of a face, a boundary of 2D manifold cell.
Definition: Loop.h:44
virtual MGCellNB * clone_binder(const MGCellBase &c) const =0
virtual MGCellNB & operator-=(const MGVector &v)
MGPVertex * vertex_end()
Definition: Edge.h:494
virtual MGCellNB & operator*=(double scale)
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
std::string whoami() const
Definition: Edge.h:502
container_type::iterator pcellItr
Definition: Complex.h:33
friend class MGEdge
Definition: CellNB.h:298
virtual MGCellNB * make_binder() const =0
virtual MGCellNB & operator+=(const MGVector &v)
Object transformation.
const MGPVertex * vertex_start() const
Definition: Edge.h:490
virtual void draw3DVertex(mgVBO &vbo) const =0
bool active_start() const
Definition: Edge.h:143
virtual std::vector< const MGCellNB * > neighbours() const =0
virtual bool operator==(const MGGel &gel2) const
Comparison.
Definition: Gel.h:80
virtual void ReadMembers(MGIfstream &buf)
Read Object's member data.
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
virtual MGPosition center_param() const =0
Obtain the center parameter value of this cell.
MGPVertex is a parameter cell of the manifold dimension 0.
Definition: PVertex.h:34
MGPVertex * vertex(int id)
Definition: Edge.h:492
void trim_end(double t)
Trim the loop. Result is from start to t1.
Definition: Edge.h:480
MGPosition end_point() const
Obtain the end point of the edge.
Definition: Edge.h:262
void connect_at_end(MGPVertex &pvert)
Connect the end of this to the pvert's edge at pvert.
Definition: Edge.h:215
virtual MGCellNB * clone() const =0
double param_span() const
Obtain parameter span of this edge.
Definition: Edge.h:396
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30