Commit fc8cdda0 authored by Mike Kremer's avatar Mike Kremer

Changed inheritance structure of core components and topology specializations...

Changed inheritance structure of core components and topology specializations as described in the documentation.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@98 66977474-1d4b-4f09-8fe9-267525286df2
parent b467ccf3
...@@ -51,15 +51,11 @@ ...@@ -51,15 +51,11 @@
namespace OpenVolumeMesh { namespace OpenVolumeMesh {
// Forward declaration template <class GeomKernelT>
template<class VecT>
class GeometryKernel;
template <class VecT>
class NormalAttrib { class NormalAttrib {
public: public:
NormalAttrib(GeometryKernel<VecT>& _kernel); NormalAttrib(GeomKernelT& _kernel);
virtual ~NormalAttrib(); virtual ~NormalAttrib();
/** \brief A simple heuristic to estimate the vertex normals /** \brief A simple heuristic to estimate the vertex normals
...@@ -79,22 +75,22 @@ public: ...@@ -79,22 +75,22 @@ public:
*/ */
void update_face_normals(); void update_face_normals();
const VecT& operator[](const VertexHandle& _h) const { const typename GeomKernelT::PointT& operator[](const VertexHandle& _h) const {
assert((unsigned int)_h.idx < v_normals_.size()); assert((unsigned int)_h.idx < v_normals_.size());
return v_normals_[_h.idx()]; return v_normals_[_h.idx()];
} }
const VecT& operator[](const FaceHandle& _h) const { const typename GeomKernelT::PointT& operator[](const FaceHandle& _h) const {
assert((unsigned int)_h.idx < f_normals_.size()); assert((unsigned int)_h.idx < f_normals_.size());
return f_normals_[_h.idx()]; return f_normals_[_h.idx()];
} }
VecT& operator[](const VertexHandle& _h) { typename GeomKernelT::PointT& operator[](const VertexHandle& _h) {
assert((unsigned int)_h.idx < kernel_.n_vertices()); assert((unsigned int)_h.idx < kernel_.n_vertices());
return v_normals_[_h.idx()]; return v_normals_[_h.idx()];
} }
VecT& operator[](const FaceHandle& _h) { typename GeomKernelT::PointT& operator[](const FaceHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_faces()); assert((unsigned int)_h.idx() < kernel_.n_faces());
return f_normals_[_h.idx()]; return f_normals_[_h.idx()];
} }
...@@ -105,10 +101,10 @@ private: ...@@ -105,10 +101,10 @@ private:
void compute_face_normal(const FaceHandle& _fh); void compute_face_normal(const FaceHandle& _fh);
GeometryKernel<VecT>& kernel_; GeomKernelT& kernel_;
VertexPropertyT<VecT> v_normals_; VertexPropertyT<typename GeomKernelT::PointT> v_normals_;
FacePropertyT<VecT> f_normals_; FacePropertyT<typename GeomKernelT::PointT> f_normals_;
}; };
} // Namespace OpenVolumeMesh } // Namespace OpenVolumeMesh
......
...@@ -50,21 +50,21 @@ ...@@ -50,21 +50,21 @@
namespace OpenVolumeMesh { namespace OpenVolumeMesh {
template <class VecT> template <class GeomKernelT>
NormalAttrib<VecT>::NormalAttrib(GeometryKernel<VecT>& _kernel) : NormalAttrib<GeomKernelT>::NormalAttrib(GeomKernelT& _kernel) :
kernel_(_kernel), kernel_(_kernel),
v_normals_(_kernel.template request_vertex_property<VecT>("vertex_normals")), v_normals_(_kernel.template request_vertex_property<typename GeomKernelT::PointT>("vertex_normals")),
f_normals_(_kernel.template request_face_property<VecT>("face_normals")) { f_normals_(_kernel.template request_face_property<typename GeomKernelT::PointT>("face_normals")) {
} }
template <class VecT> template <class GeomKernelT>
NormalAttrib<VecT>::~NormalAttrib() { NormalAttrib<GeomKernelT>::~NormalAttrib() {
} }
template <class VecT> template <class GeomKernelT>
void NormalAttrib<VecT>::update_vertex_normals() { void NormalAttrib<GeomKernelT>::update_vertex_normals() {
if(!kernel_.has_bottom_up_adjacencies()) { if(!kernel_.has_bottom_up_adjacencies()) {
std::cerr << "Error: update_vertex_normals() needs bottom-up adjacencies!" << std::endl; std::cerr << "Error: update_vertex_normals() needs bottom-up adjacencies!" << std::endl;
...@@ -79,8 +79,8 @@ void NormalAttrib<VecT>::update_vertex_normals() { ...@@ -79,8 +79,8 @@ void NormalAttrib<VecT>::update_vertex_normals() {
} }
} }
template <class VecT> template <class GeomKernelT>
void NormalAttrib<VecT>::update_face_normals() { void NormalAttrib<GeomKernelT>::update_face_normals() {
for(FaceIter f_it = kernel_.f_iter(); f_it.valid(); ++f_it) { for(FaceIter f_it = kernel_.f_iter(); f_it.valid(); ++f_it) {
// Assume the face is planar, so just take the // Assume the face is planar, so just take the
...@@ -89,8 +89,8 @@ void NormalAttrib<VecT>::update_face_normals() { ...@@ -89,8 +89,8 @@ void NormalAttrib<VecT>::update_face_normals() {
} }
} }
template <typename VecT> template <class GeomKernelT>
void NormalAttrib<VecT>::compute_vertex_normal(const VertexHandle& _vh) { void NormalAttrib<GeomKernelT>::compute_vertex_normal(const VertexHandle& _vh) {
std::set<FaceHandle> faces; std::set<FaceHandle> faces;
for(VertexOHalfEdgeIter voh_it = kernel_.voh_iter(_vh); for(VertexOHalfEdgeIter voh_it = kernel_.voh_iter(_vh);
...@@ -103,7 +103,7 @@ void NormalAttrib<VecT>::compute_vertex_normal(const VertexHandle& _vh) { ...@@ -103,7 +103,7 @@ void NormalAttrib<VecT>::compute_vertex_normal(const VertexHandle& _vh) {
} }
} }
} }
VecT normal; typename GeomKernelT::PointT normal;
for(std::set<FaceHandle>::const_iterator f_it = faces.begin(); for(std::set<FaceHandle>::const_iterator f_it = faces.begin();
f_it != faces.end(); ++f_it) { f_it != faces.end(); ++f_it) {
normal += f_normals_[f_it->idx()]; normal += f_normals_[f_it->idx()];
...@@ -114,8 +114,8 @@ void NormalAttrib<VecT>::compute_vertex_normal(const VertexHandle& _vh) { ...@@ -114,8 +114,8 @@ void NormalAttrib<VecT>::compute_vertex_normal(const VertexHandle& _vh) {
v_normals_[_vh.idx()] = normal; v_normals_[_vh.idx()] = normal;
} }
template <typename VecT> template <class GeomKernelT>
void NormalAttrib<VecT>::compute_face_normal(const FaceHandle& _fh) { void NormalAttrib<GeomKernelT>::compute_face_normal(const FaceHandle& _fh) {
if(kernel_.face(_fh).halfedges().size() < 3) { if(kernel_.face(_fh).halfedges().size() < 3) {
std::cerr << "Warning: Degenerate face detected!" << std::endl; std::cerr << "Warning: Degenerate face detected!" << std::endl;
...@@ -129,12 +129,12 @@ void NormalAttrib<VecT>::compute_face_normal(const FaceHandle& _fh) { ...@@ -129,12 +129,12 @@ void NormalAttrib<VecT>::compute_face_normal(const FaceHandle& _fh) {
std::vector<HalfEdgeHandle> halfedges = kernel_.halfface(hfh).halfedges(); std::vector<HalfEdgeHandle> halfedges = kernel_.halfface(hfh).halfedges();
std::vector<HalfEdgeHandle>::const_iterator he_it = halfedges.begin(); std::vector<HalfEdgeHandle>::const_iterator he_it = halfedges.begin();
VecT p1 = kernel_.vertex(kernel_.halfedge(*he_it).from_vertex()); typename GeomKernelT::PointT p1 = kernel_.vertex(kernel_.halfedge(*he_it).from_vertex());
VecT p2 = kernel_.vertex(kernel_.halfedge(*he_it).to_vertex()); typename GeomKernelT::PointT p2 = kernel_.vertex(kernel_.halfedge(*he_it).to_vertex());
++he_it; ++he_it;
VecT p3 = kernel_.vertex(kernel_.halfedge(*he_it).to_vertex()); typename GeomKernelT::PointT p3 = kernel_.vertex(kernel_.halfedge(*he_it).to_vertex());
VecT n = (p3 - p2) % (p1 - p2); typename GeomKernelT::PointT n = (p3 - p2) % (p1 - p2);
n.normalize(); n.normalize();
f_normals_[_fh.idx()] = n; f_normals_[_fh.idx()] = n;
......
...@@ -50,11 +50,12 @@ ...@@ -50,11 +50,12 @@
namespace OpenVolumeMesh { namespace OpenVolumeMesh {
template <class VecT> template <class VecT, class TopologyKernelT = TopologyKernel>
class GeometryKernel : public TopologyKernel { class GeometryKernel : public TopologyKernelT {
public: public:
typedef VecT PointT; typedef VecT PointT;
typedef TopologyKernelT KernelT;
/// Constructor /// Constructor
GeometryKernel() {} GeometryKernel() {}
...@@ -99,7 +100,7 @@ public: ...@@ -99,7 +100,7 @@ public:
virtual VertexIter delete_vertex(const VertexHandle& _h) { virtual VertexIter delete_vertex(const VertexHandle& _h) {
assert(_h.idx() < (int)n_vertices()); assert(_h.idx() < (int)n_vertices());
VertexIter nV = TopologyKernel::delete_vertex(_h); VertexIter nV = TopologyKernelT::delete_vertex(_h);
vertices_.erase(vertices_.begin() + _h.idx()); vertices_.erase(vertices_.begin() + _h.idx());
...@@ -109,7 +110,7 @@ public: ...@@ -109,7 +110,7 @@ public:
virtual void clear() { virtual void clear() {
vertices_.clear(); vertices_.clear();
TopologyKernel::clear(); TopologyKernelT::clear();
} }
private: private:
......
...@@ -50,9 +50,9 @@ namespace OpenVolumeMesh { ...@@ -50,9 +50,9 @@ namespace OpenVolumeMesh {
/* /*
* Predefines for most common mesh types * Predefines for most common mesh types
*/ */
typedef HexahedralMeshTopologyKernel<GeometryKernel<Geometry::Vec3d> > GeometricHexahedralMeshV3d; typedef GeometryKernel<Geometry::Vec3d, HexahedralMeshTopologyKernel> GeometricHexahedralMeshV3d;
typedef HexahedralMeshTopologyKernel<TopologyKernel> TopologicHexahedralMesh; typedef HexahedralMeshTopologyKernel TopologicHexahedralMesh;
} // Namespace OpenVolumeMesh } // Namespace OpenVolumeMesh
......
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
* * * *
\*===========================================================================*/ \*===========================================================================*/
#define HEXAHEDRALMESHITERATORST_CC
#include <set> #include <set>
#include "HexahedralMeshIterators.hh" #include "HexahedralMeshIterators.hh"
...@@ -54,9 +52,9 @@ namespace OpenVolumeMesh { ...@@ -54,9 +52,9 @@ namespace OpenVolumeMesh {
// CellSheetCellIter // CellSheetCellIter
//================================================================================================ //================================================================================================
template<class KernelT>
CellSheetCellIter<KernelT>::CellSheetCellIter(const CellHandle& _ref_h, CellSheetCellIter::CellSheetCellIter(const CellHandle& _ref_h,
const unsigned char _orthDir, const HexahedralMeshTopologyKernel<KernelT>* _mesh) : const unsigned char _orthDir, const HexahedralMeshTopologyKernel* _mesh) :
BaseIter(_mesh, _ref_h) { BaseIter(_mesh, _ref_h) {
if(!_mesh->has_bottom_up_adjacencies()) { if(!_mesh->has_bottom_up_adjacencies()) {
...@@ -73,7 +71,7 @@ BaseIter(_mesh, _ref_h) { ...@@ -73,7 +71,7 @@ BaseIter(_mesh, _ref_h) {
if(_mesh->orientation(*hf_it, _ref_h) != _orthDir && if(_mesh->orientation(*hf_it, _ref_h) != _orthDir &&
_mesh->orientation(*hf_it, _ref_h) != _mesh->opposite_orientation(_orthDir)) { _mesh->orientation(*hf_it, _ref_h) != _mesh->opposite_orientation(_orthDir)) {
CellHandle ch = _mesh->incident_cell(_mesh->opposite_halfface_handle(*hf_it)); CellHandle ch = _mesh->incident_cell(_mesh->opposite_halfface_handle(*hf_it));
if(ch != KernelT::InvalidCellHandle) { if(ch != TopologyKernel::InvalidCellHandle) {
neighb_sheet_cell_hs_.insert(ch); neighb_sheet_cell_hs_.insert(ch);
} }
} }
...@@ -86,8 +84,8 @@ BaseIter(_mesh, _ref_h) { ...@@ -86,8 +84,8 @@ BaseIter(_mesh, _ref_h) {
} }
} }
template<class KernelT>
CellSheetCellIter<KernelT>& CellSheetCellIter<KernelT>::operator--() { CellSheetCellIter& CellSheetCellIter::operator--() {
if(cur_it_ == neighb_sheet_cell_hs_.begin()) { if(cur_it_ == neighb_sheet_cell_hs_.begin()) {
BaseIter::valid(false); BaseIter::valid(false);
...@@ -98,8 +96,8 @@ CellSheetCellIter<KernelT>& CellSheetCellIter<KernelT>::operator--() { ...@@ -98,8 +96,8 @@ CellSheetCellIter<KernelT>& CellSheetCellIter<KernelT>::operator--() {
return *this; return *this;
} }
template<class KernelT>
CellSheetCellIter<KernelT>& CellSheetCellIter<KernelT>::operator++() { CellSheetCellIter& CellSheetCellIter::operator++() {
++cur_it_; ++cur_it_;
if(cur_it_ != neighb_sheet_cell_hs_.end()) { if(cur_it_ != neighb_sheet_cell_hs_.end()) {
...@@ -114,9 +112,9 @@ CellSheetCellIter<KernelT>& CellSheetCellIter<KernelT>::operator++() { ...@@ -114,9 +112,9 @@ CellSheetCellIter<KernelT>& CellSheetCellIter<KernelT>::operator++() {
// HalfFaceSheetHalfFaceIter // HalfFaceSheetHalfFaceIter
//================================================================================================ //================================================================================================
template<class KernelT>
HalfFaceSheetHalfFaceIter<KernelT>::HalfFaceSheetHalfFaceIter(const HalfFaceHandle& _ref_h, HalfFaceSheetHalfFaceIter::HalfFaceSheetHalfFaceIter(const HalfFaceHandle& _ref_h,
const HexahedralMeshTopologyKernel<KernelT>* _mesh) : const HexahedralMeshTopologyKernel* _mesh) :
BaseIter(_mesh, _ref_h) { BaseIter(_mesh, _ref_h) {
if(!_mesh->has_bottom_up_adjacencies()) { if(!_mesh->has_bottom_up_adjacencies()) {
...@@ -148,7 +146,7 @@ BaseIter(_mesh, _ref_h) { ...@@ -148,7 +146,7 @@ BaseIter(_mesh, _ref_h) {
std::set<HalfEdgeHandle> hes; std::set<HalfEdgeHandle> hes;
hes.insert(hes_v.begin(), hes_v.end()); hes.insert(hes_v.begin(), hes_v.end());
for(CellSheetCellIter<KernelT> csc_it = _mesh->csc_iter(ch, orientation); for(CellSheetCellIter csc_it = _mesh->csc_iter(ch, orientation);
csc_it.valid(); ++csc_it) { csc_it.valid(); ++csc_it) {
std::vector<HalfFaceHandle> hfs = _mesh->cell(*csc_it).halffaces(); std::vector<HalfFaceHandle> hfs = _mesh->cell(*csc_it).halffaces();
...@@ -177,8 +175,8 @@ BaseIter(_mesh, _ref_h) { ...@@ -177,8 +175,8 @@ BaseIter(_mesh, _ref_h) {
} }
} }
template<class KernelT>
HalfFaceSheetHalfFaceIter<KernelT>& HalfFaceSheetHalfFaceIter<KernelT>::operator--() { HalfFaceSheetHalfFaceIter& HalfFaceSheetHalfFaceIter::operator--() {
--cur_it_; --cur_it_;
--edge_it_; --edge_it_;
...@@ -190,8 +188,8 @@ HalfFaceSheetHalfFaceIter<KernelT>& HalfFaceSheetHalfFaceIter<KernelT>::operator ...@@ -190,8 +188,8 @@ HalfFaceSheetHalfFaceIter<KernelT>& HalfFaceSheetHalfFaceIter<KernelT>::operator
return *this; return *this;
} }
template<class KernelT>
HalfFaceSheetHalfFaceIter<KernelT>& HalfFaceSheetHalfFaceIter<KernelT>::operator++() { HalfFaceSheetHalfFaceIter& HalfFaceSheetHalfFaceIter::operator++() {
++cur_it_; ++cur_it_;
++edge_it_; ++edge_it_;
...@@ -207,9 +205,9 @@ HalfFaceSheetHalfFaceIter<KernelT>& HalfFaceSheetHalfFaceIter<KernelT>::operator ...@@ -207,9 +205,9 @@ HalfFaceSheetHalfFaceIter<KernelT>& HalfFaceSheetHalfFaceIter<KernelT>::operator
// OutsideNeighborHalfFaceIter // OutsideNeighborHalfFaceIter
//================================================================================================ //================================================================================================
template<class KernelT>
OutsideNeighborHalfFaceIter<KernelT>::OutsideNeighborHalfFaceIter(const HalfFaceHandle& _ref_h, OutsideNeighborHalfFaceIter::OutsideNeighborHalfFaceIter(const HalfFaceHandle& _ref_h,
const HexahedralMeshTopologyKernel<KernelT>* _mesh) : const HexahedralMeshTopologyKernel* _mesh) :
BaseIter(_mesh, _ref_h) { BaseIter(_mesh, _ref_h) {
if(!_mesh->has_bottom_up_adjacencies()) { if(!_mesh->has_bottom_up_adjacencies()) {
...@@ -224,7 +222,7 @@ BaseIter(_mesh, _ref_h) { ...@@ -224,7 +222,7 @@ BaseIter(_mesh, _ref_h) {
he_it != halfedges.end(); ++he_it) { he_it != halfedges.end(); ++he_it) {
// Get outside halffaces // Get outside halffaces
typename KernelT::HalfEdgeHalfFaceIter hehf_it = _mesh->hehf_iter(_mesh->opposite_halfedge_handle(*he_it)); OpenVolumeMesh::HalfEdgeHalfFaceIter hehf_it = _mesh->hehf_iter(_mesh->opposite_halfedge_handle(*he_it));
for(; hehf_it.valid(); ++hehf_it) { for(; hehf_it.valid(); ++hehf_it) {
if(_mesh->is_boundary(*hehf_it)) { if(_mesh->is_boundary(*hehf_it)) {
...@@ -242,8 +240,8 @@ BaseIter(_mesh, _ref_h) { ...@@ -242,8 +240,8 @@ BaseIter(_mesh, _ref_h) {
} }
} }
template<class KernelT>
OutsideNeighborHalfFaceIter<KernelT>& OutsideNeighborHalfFaceIter<KernelT>::operator--() { OutsideNeighborHalfFaceIter& OutsideNeighborHalfFaceIter::operator--() {
--cur_it_; --cur_it_;
--edge_it_; --edge_it_;
...@@ -255,8 +253,8 @@ OutsideNeighborHalfFaceIter<KernelT>& OutsideNeighborHalfFaceIter<KernelT>::oper ...@@ -255,8 +253,8 @@ OutsideNeighborHalfFaceIter<KernelT>& OutsideNeighborHalfFaceIter<KernelT>::oper
return *this; return *this;
} }
template<class KernelT>
OutsideNeighborHalfFaceIter<KernelT>& OutsideNeighborHalfFaceIter<KernelT>::operator++() { OutsideNeighborHalfFaceIter& OutsideNeighborHalfFaceIter::operator++() {
++cur_it_; ++cur_it_;
++edge_it_; ++edge_it_;
......
...@@ -47,10 +47,9 @@ ...@@ -47,10 +47,9 @@
namespace OpenVolumeMesh { namespace OpenVolumeMesh {
template<class KernelT>
class HexahedralMeshTopologyKernel; class HexahedralMeshTopologyKernel;
template<class KernelT>
class CellSheetCellIter : public BaseIterator<CellHandle, class CellSheetCellIter : public BaseIterator<CellHandle,
CellHandle> { CellHandle> {
private: private:
...@@ -58,7 +57,7 @@ private: ...@@ -58,7 +57,7 @@ private:
CellHandle> BaseIter; CellHandle> BaseIter;
public: public:
CellSheetCellIter(const CellHandle& _ref_h, const unsigned char _orthDir, CellSheetCellIter(const CellHandle& _ref_h, const unsigned char _orthDir,
const HexahedralMeshTopologyKernel<KernelT>* _mesh); const HexahedralMeshTopologyKernel* _mesh);
CellSheetCellIter& operator=(const CellSheetCellIter& _c) { CellSheetCellIter& operator=(const CellSheetCellIter& _c) {
BaseIter::operator=(_c); BaseIter::operator=(_c);
...@@ -113,7 +112,7 @@ private: ...@@ -113,7 +112,7 @@ private:
std::set<CellHandle>::const_iterator cur_it_; std::set<CellHandle>::const_iterator cur_it_;
}; };
template<class KernelT>
class HalfFaceSheetHalfFaceIter : public BaseIterator<HalfFaceHandle, class HalfFaceSheetHalfFaceIter : public BaseIterator<HalfFaceHandle,
HalfFaceHandle> { HalfFaceHandle> {
private: private:
...@@ -121,7 +120,7 @@ private: ...@@ -121,7 +120,7 @@ private:
HalfFaceHandle> BaseIter; HalfFaceHandle> BaseIter;
public: public:
HalfFaceSheetHalfFaceIter(const HalfFaceHandle& _ref_h, HalfFaceSheetHalfFaceIter(const HalfFaceHandle& _ref_h,
const HexahedralMeshTopologyKernel<KernelT>* _mesh); const HexahedralMeshTopologyKernel* _mesh);
HalfFaceSheetHalfFaceIter& operator=(const HalfFaceSheetHalfFaceIter& _c) { HalfFaceSheetHalfFaceIter& operator=(const HalfFaceSheetHalfFaceIter& _c) {
BaseIter::operator=(_c); BaseIter::operator=(_c);
adjacent_halffaces_ = _c.adjacent_halffaces_; adjacent_halffaces_ = _c.adjacent_halffaces_;
...@@ -179,7 +178,7 @@ private: ...@@ -179,7 +178,7 @@ private:
std::vector<EdgeHandle>::const_iterator edge_it_; std::vector<EdgeHandle>::const_iterator edge_it_;
}; };
template<class KernelT>
class OutsideNeighborHalfFaceIter : public BaseIterator<HalfFaceHandle, class OutsideNeighborHalfFaceIter : public BaseIterator<HalfFaceHandle,
HalfFaceHandle> { HalfFaceHandle> {
private: private:
...@@ -187,7 +186,7 @@ private: ...@@ -187,7 +186,7 @@ private:
HalfFaceHandle> BaseIter; HalfFaceHandle> BaseIter;
public: public:
OutsideNeighborHalfFaceIter(const HalfFaceHandle& _ref_h, OutsideNeighborHalfFaceIter(const HalfFaceHandle& _ref_h,
const HexahedralMeshTopologyKernel<KernelT>* _mesh); const HexahedralMeshTopologyKernel* _mesh);
OutsideNeighborHalfFaceIter& operator=(const OutsideNeighborHalfFaceIter& _c) { OutsideNeighborHalfFaceIter& operator=(const OutsideNeighborHalfFaceIter& _c) {
BaseIter::operator=(_c); BaseIter::operator=(_c);
neighbor_halffaces_ = _c.neighbor_halffaces_; neighbor_halffaces_ = _c.neighbor_halffaces_;
...@@ -247,8 +246,4 @@ private: ...@@ -247,8 +246,4 @@ private:
} // Namespace OpenVolumeMesh } // Namespace OpenVolumeMesh
#if defined(INCLUDE_TEMPLATES) && !defined(HEXAHEDRALMESHITERATORST_CC)
#include "HexahedralMeshIteratorsT.cc"
#endif
#endif /* HEXAHEDRALMESHITERATORS_HH */ #endif /* HEXAHEDRALMESHITERATORS_HH */
...@@ -40,66 +40,64 @@ ...@@ -40,66 +40,64 @@
* * * *
\*===========================================================================*/ \*===========================================================================*/
#define HEXAHEDRALMESHTOPOLOGYKERNELT_CC
#include "HexahedralMeshTopologyKernel.hh" #include "HexahedralMeshTopologyKernel.hh"
namespace OpenVolumeMesh { namespace OpenVolumeMesh {
template <typename KernelT>
HexahedralMeshTopologyKernel<KernelT>::HexahedralMeshTopologyKernel() { HexahedralMeshTopologyKernel::HexahedralMeshTopologyKernel() {
} }
//======================================================================================== //========================================================================================
template <typename KernelT>
HexahedralMeshTopologyKernel<KernelT>::~HexahedralMeshTopologyKernel() { HexahedralMeshTopologyKernel::~HexahedralMeshTopologyKernel() {
} }
//======================================================================================== //========================================================================================
template <typename KernelT>
FaceHandle HexahedralMeshTopologyKernel<KernelT>::add_face(const std::vector<HalfEdgeHandle>& _halfedges, bool _topologyCheck) { FaceHandle HexahedralMeshTopologyKernel::add_face(const std::vector<HalfEdgeHandle>& _halfedges, bool _topologyCheck) {
if(_halfedges.size() != 4) { if(_halfedges.size() != 4) {
std::cerr << "Face valence is not four! Aborting." << std::endl; std::cerr << "Face valence is not four! Aborting." << std::endl;
return KernelT::InvalidFaceHandle; return TopologyKernel::InvalidFaceHandle;
}