MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
BVertex.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #ifndef _MGBVertex_HH_
6 #define _MGBVertex_HH_
7 
8 #include "mg/Default.h"
9 #include "mg/Position.h"
10 #include "topo/CellNB.h"
11 
12 class MGBox;
13 class MGOfstream;
14 class MGIfstream;
15 class MGPVertex;
16 
17 //
18 //Define MGBVertex Class.
19 
24 
30 class MG_DLL_DECLR MGBVertex:public MGCellNB{
31 
32 public:
34 
36 MGBVertex(){;};
37 
40 
45 MGBVertex(MGGeometry* geo);
46 
48 MGBVertex(const MGPosition& V);
49 
50 ~MGBVertex();
51 
53 
57 MGBVertex& operator=(const MGGel& gel2);
58 MGBVertex& operator=(const MGBVertex& gel2);
59 
61 bool operator<(const MGBVertex& gel2)const;
62 bool operator<(const MGGel& gel2)const;
63 
65 
67 const MGBox& box() const{return mgNULL_BOX;};
68 
70 MGPosition center_param() const{return MGPosition();};
71 
74 MGBVertex* clone() const{return new MGBVertex(*this);};
75 MGBVertex* clone_without_boundaries() const{return new MGBVertex(*this);};
76 
79 MGBVertex* clone_binder(const MGCellBase& c) const;
80 
83 void drawWire(
84  mgVBO& vbo,
85  double span_length,
86  int line_density=1
87 )const;
88 
92 void draw3DVertex(mgVBO& vbo)const;
93 
95 void free_neighbourhood(int i, int j=0){;};
96 
98 long identify_type()const;
99 
103 MGCellNB* make_binder() const;
104 
106 int manifold_dimension() const{return 0;};
107 
109 const MGPVertex* member_partner_vertex(int i)const;
110 
115 std::vector<const MGCellNB*> neighbours() const{
116  return std::vector<const MGCellNB*>();
117 }
118 
120 std::ostream& out(std::ostream&) const;
121 
123 double parameter_error()const{return 0.;};
124 
130 MGPosition pick_closest(const MGStraight& sl)const;
131 
133 const MGPoint* point() const;
134 
138 MGPosition position() const;
139 
140 protected:
141 
144 void bn_binder_tr(const MGVector& v){;};
145 void bn_binder_tr(double s){;};
146 void bn_binder_tr(const MGMatrix& mat){;};
147 void bn_binder_tr(const MGTransf& tr){;};
148 
150 void set_box_as_null() const{;};
151 
156 MGBVertex* clone(MGCellMap& cmap) const{return (MGBVertex*)MGCellNB::clone(cmap);};
157 
159 void compute_box() const{;};
160 
162 void copy_all_boundaries(const MGCellBase& cell2){;};
163 
167 void copy_all_boundaries(const MGCellBase& cell2, MGCellMap& cmap){;};
168 
170 void copy_box(const MGCellBase& cell2) const{;};
171 
173 void copy_perror(const MGCellBase& cell2) const{;};
174 
177 void get_all_boundary_binders(std::vector<MGCellNB*>& cvec) const{;};
178 
180 void negate_boundary(){;};
181 
182 std::string whoami()const{return "BVertex";};
183 
185 void ReadMembers(MGIfstream& buf);
186 
188 void WriteMembers(MGOfstream& buf) const;
189 
190 private:
191 
195 MGGeometry* make_binder_extent() const;
196 
203 void make_extent() const;
204 
205 };
206  // end of TOPO group
208 #endif
CellNB is a cell without boundaries(No Boundaries).
Definition: CellNB.h:38
MG_DLL_DECLR const MGBox mgNULL_BOX
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.
MGBVertex * clone() const
Definition: BVertex.h:74
MGPosition center_param() const
Obtain the center parameter value of this cell.
Definition: BVertex.h:70
MGBVertex * clone(MGCellMap &cmap) const
Definition: BVertex.h:156
void bn_binder_tr(const MGMatrix &mat)
Definition: BVertex.h:146
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
virtual bool operator<(const MGGel &gel2) const
MGPoint represents one dimensional manifold, a point in a space.
Definition: Point.h:28
virtual long identify_type() const =0
Return Object's type ID (TID)
void bn_binder_tr(const MGTransf &tr)
Definition: BVertex.h:147
void bn_binder_tr(double s)
Definition: BVertex.h:145
void free_neighbourhood(int i, int j=0)
Free neighbourhood relation at j-th boundary's i-th pcell of this cell.
Definition: BVertex.h:95
void compute_box() const
compute box of the cell in m_box.
Definition: BVertex.h:159
void get_all_boundary_binders(std::vector< MGCellNB * > &cvec) const
Definition: BVertex.h:177
virtual MGCellNB & operator=(const MGCellNB &gel2)
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual void drawWire(mgVBO &vbo, double span_length, int line_density=1) const =0
void copy_all_boundaries(const MGCellBase &cell2)
Copy boundary data of cell2 into this.
Definition: BVertex.h:162
std::vector< const MGCellNB * > neighbours() const
Definition: BVertex.h:115
void negate_boundary()
Negate the boundary.
Definition: BVertex.h:180
Vector of a general n space dimension.
Definition: Vector.h:26
virtual std::ostream & out(std::ostream &) const
Output virtual function.
MGGeometry is an abstract class which represents a whole geometry.
Definition: Geometry.h:36
Defines a Box of any space dimendion.
Definition: Box.h:34
const MGBox & box() const
Obtain the box into which the topology is included.
Definition: BVertex.h:67
double parameter_error() const
Return parameter space error of the cell.
Definition: BVertex.h:123
virtual MGPosition pick_closest(const MGStraight &sl) const
Definition: Object.h:146
virtual MGPoint * point()
Return point pointer if this MGGel is an MGPoint, else return null.
Definition: Gel.h:135
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
void copy_box(const MGCellBase &cell2) const
Copy m_box data of cell2 into this.
Definition: BVertex.h:170
MGStraight is a curve of any space dimension, represent a straight line.
Definition: Straight.h:49
Represent a positional data.
Definition: Position.h:28
void copy_all_boundaries(const MGCellBase &cell2, MGCellMap &cmap)
Definition: BVertex.h:167
virtual MGCellNB * clone_binder(const MGCellBase &c) const =0
int manifold_dimension() const
Get manifold dimension.
Definition: BVertex.h:106
MGBVertex * clone_without_boundaries() const
Definition: BVertex.h:75
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
MGBVertex()
Void constructor.
Definition: BVertex.h:36
virtual MGCellNB * make_binder() const =0
void copy_perror(const MGCellBase &cell2) const
Copy m_perror data of cell2 into this.
Definition: BVertex.h:173
virtual void draw3DVertex(mgVBO &vbo) const =0
std::string whoami() const
Definition: BVertex.h:182
void set_box_as_null() const
Set the box data as null.
Definition: BVertex.h:150
virtual void ReadMembers(MGIfstream &buf)
Read Object's member data.
void bn_binder_tr(const MGVector &v)
Definition: BVertex.h:144
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
MGPVertex is a parameter cell of the manifold dimension 0.
Definition: PVertex.h:34
virtual MGCellNB * clone() const =0
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30