Skip to content
Snippets Groups Projects
Commit 21a08e51 authored by Darcy Beurle's avatar Darcy Beurle
Browse files

Formatting

parent 51e0dd45
No related branches found
No related tags found
No related merge requests found
......@@ -39,9 +39,6 @@ class MVertex{
// the geometrical entity the vertex is associated with
GEntity *_ge;
public:
typedef std::vector<int>::size_type size_type;
public:
MVertex(double x, double y, double z, GEntity *ge = 0, int num = 0);
virtual ~MVertex() {}
......@@ -64,7 +61,12 @@ public:
double &z() { return _z; }
SPoint3 point() const { return SPoint3(_x, _y, _z); }
void setXYZ(double x, double y, double z) { _x = x; _y = y; _z = z; }
void setXYZ(double x, double y, double z)
{
_x = x;
_y = y;
_z = z;
}
// get/set the parent entity
GEntity *onWhat() const { return _ge; }
......@@ -81,9 +83,12 @@ public:
int getIndex() const { return _index; }
void setIndex(int index) { _index = index; }
// get/set ith parameter
virtual bool getParameter(int i, double &par) const { par = 0.; return false; }
virtual bool getParameter(int i, double &par) const
{
par = 0.;
return false;
}
virtual bool setParameter(int i, double par) { return false; }
// measure distance to another vertex
......@@ -120,35 +125,58 @@ public:
class MEdgeVertex : public MVertex {
protected:
double _u, _lc;
public:
MVertexBoundaryLayerData *bl_data;
MEdgeVertex(double x, double y, double z, GEntity *ge, double u, int num = 0,
double lc = -1.0)
: MVertex(x, y, z, ge,num), _u(u), _lc(lc), bl_data(0)
: MVertex(x, y, z, ge, num)
, _u(u)
, _lc(lc)
, bl_data(0)
{
}
virtual ~MEdgeVertex()
{
if(bl_data) delete bl_data;
}
virtual bool getParameter(int i, double &par) const
{
par = _u;
return true;
}
virtual bool setParameter(int i, double par)
{
_u = par;
return true;
}
virtual ~MEdgeVertex(){ if(bl_data) delete bl_data; }
virtual bool getParameter(int i, double &par) const { par = _u; return true; }
virtual bool setParameter(int i, double par){ _u = par; return true; }
double getLc() const { return _lc; }
};
class MFaceVertex : public MVertex {
protected:
double _u, _v;
public:
MVertexBoundaryLayerData *bl_data;
MFaceVertex(double x, double y, double z, GEntity *ge, double u, double v,
int num = 0)
: MVertex(x, y, z, ge, num), _u(u), _v(v), bl_data(0)
: MVertex(x, y, z, ge, num)
, _u(u)
, _v(v)
, bl_data(0)
{
}
virtual ~MFaceVertex()
{
if(bl_data) delete bl_data;
}
virtual ~MFaceVertex(){ if(bl_data) delete bl_data; }
virtual bool getParameter(int i, double &par) const
{
par = (i ? _v : _u); return true;
par = (i ? _v : _u);
return true;
}
virtual bool setParameter(int i, double par)
{
......@@ -162,6 +190,7 @@ class MFaceVertex : public MVertex{
class MVertexLessThanLexicographic {
static double tolerance;
public:
static double getTolerance();
bool operator()(const MVertex *v1, const MVertex *v2) const;
......@@ -172,8 +201,8 @@ class MVertexLessThanNum{
bool operator()(const MVertex *v1, const MVertex *v2) const;
};
bool reparamMeshEdgeOnFace(MVertex *v1, MVertex *v2, GFace *gf,
SPoint2 &param1, SPoint2 &param2);
bool reparamMeshEdgeOnFace(MVertex *v1, MVertex *v2, GFace *gf, SPoint2 &param1,
SPoint2 &param2);
bool reparamMeshVertexOnFace(MVertex const *v, const GFace *gf, SPoint2 &param,
bool onSurface = true);
bool reparamMeshVertexOnEdge(MVertex *v, const GEdge *ge, double &param);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment