Commit 122293b2 authored by Martin Schultz's avatar Martin Schultz

added copy constructor to PolyMesh_ArrayKernelT and TriMesh_ArrayKernelT

parent 74e4e72c
......@@ -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);
}
};
//=============================================================================
......
......@@ -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);
}
};
//=============================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment