ENH: cvMesh: Add variable to indexedVertex denoting whether the vertex is fixed

This commit is contained in:
laurence
2012-02-07 12:03:03 +00:00
parent a84661c204
commit ec2b286b72
2 changed files with 40 additions and 7 deletions

View File

@ -92,12 +92,15 @@ class indexedVertex
// Lowest numbered is inside one (master).
int type_;
// Required alignment of the dual cell of this vertex
//- Required alignment of the dual cell of this vertex
Foam::tensor alignment_;
// Target size of the dual cell of this vertex
//- Target size of the dual cell of this vertex
Foam::scalar targetCellSize_;
//- Specify whether the vertex is fixed or movable.
bool vertexFixed_;
public:
@ -108,6 +111,12 @@ public:
vtFar = INT_MIN + 2
};
enum vertexMotion
{
fixed = 0,
movable = 1
};
typedef typename Vb::Vertex_handle Vertex_handle;
typedef typename Vb::Cell_handle Cell_handle;
typedef typename Vb::Point Point;
@ -214,6 +223,11 @@ public:
//- Either a real or referred internal or boundary point
inline bool anyInternalOrBoundaryPoint() const;
//- Is the vertex fixed or movable
inline bool isVertexFixed() const;
//- Fix the vertex so that it can't be moved
inline void setVertexFixed() const;
// inline void operator=(const Delaunay::Finite_vertices_iterator vit)
// {

View File

@ -37,7 +37,8 @@ inline CGAL::indexedVertex<Gt, Vb>::indexedVertex()
index_(vtInternal),
type_(vtInternal),
alignment_(),
targetCellSize_(0.0)
targetCellSize_(0.0),
vertexFixed_(false)
{}
@ -48,7 +49,8 @@ inline CGAL::indexedVertex<Gt, Vb>::indexedVertex(const Point& p)
index_(vtInternal),
type_(vtInternal),
alignment_(),
targetCellSize_(0.0)
targetCellSize_(0.0),
vertexFixed_(false)
{}
@ -64,7 +66,8 @@ inline CGAL::indexedVertex<Gt, Vb>::indexedVertex
index_(index),
type_(type),
alignment_(),
targetCellSize_(0.0)
targetCellSize_(0.0),
vertexFixed_(false)
{}
@ -75,7 +78,8 @@ inline CGAL::indexedVertex<Gt, Vb>::indexedVertex(const Point& p, Cell_handle f)
index_(vtInternal),
type_(vtInternal),
alignment_(),
targetCellSize_(0.0)
targetCellSize_(0.0),
vertexFixed_(false)
{}
@ -86,7 +90,8 @@ inline CGAL::indexedVertex<Gt, Vb>::indexedVertex(Cell_handle f)
index_(vtInternal),
type_(vtInternal),
alignment_(),
targetCellSize_(0.0)
targetCellSize_(0.0),
vertexFixed_(false)
{}
@ -318,4 +323,18 @@ inline bool CGAL::indexedVertex<Gt, Vb>::anyInternalOrBoundaryPoint() const
}
template<class Gt, class Vb>
inline bool CGAL::indexedVertex<Gt, Vb>::isVertexFixed() const
{
return vertexFixed_;
}
template<class Gt, class Vb>
inline void CGAL::indexedVertex<Gt, Vb>::setVertexFixed() const
{
vertexFixed_ = true;
}
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //