added copy constructor to PolyMesh_ArrayKernelT and TriMesh_ArrayKernelT

This commit is contained in:
Martin Schultz
2016-12-08 18:17:11 +01:00
parent 74e4e72c63
commit 122293b2c0
2 changed files with 28 additions and 4 deletions

View File

@@ -74,7 +74,8 @@
namespace OpenMesh {
template<class Traits>
class TriMesh_ArrayKernelT;
//== CLASS DEFINITION =========================================================
/// Helper class to build a PolyMesh-type
@@ -97,7 +98,18 @@ struct PolyMesh_ArrayKernel_GeneratorT
template <class Traits = DefaultTraits>
class PolyMesh_ArrayKernelT
: public PolyMesh_ArrayKernel_GeneratorT<Traits>::Mesh
{};
{
public:
PolyMesh_ArrayKernelT() {}
template<class OtherTraits>
PolyMesh_ArrayKernelT( const TriMesh_ArrayKernelT<OtherTraits> & t)
{
//assign the connectivity (add vertices)
this->assign(t);
//copy properties from triMesh
this->copy_all_kernel_properties(t);
}
};
//=============================================================================

View File

@@ -74,7 +74,8 @@
namespace OpenMesh {
template<class Traits>
class PolyMesh_ArrayKernelT;
//== CLASS DEFINITION =========================================================
@@ -97,7 +98,18 @@ struct TriMesh_ArrayKernel_GeneratorT
template <class Traits = DefaultTraits>
class TriMesh_ArrayKernelT
: public TriMesh_ArrayKernel_GeneratorT<Traits>::Mesh
{};
{
public:
TriMesh_ArrayKernelT() {}
template<class OtherTraits>
TriMesh_ArrayKernelT( const PolyMesh_ArrayKernelT<OtherTraits> & t)
{
//assign the connectivity (add vertices)
this->assign(t);
//copy properties from polyMesh
this->copy_all_kernel_properties(t);
}
};
//=============================================================================