unittests_mesh_cast.cc 840 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include <iostream>

#include <gtest/gtest.h>

#include <Unittests/unittests_common.hh>


namespace {

class OpenMeshMeshCastTest: public testing::Test {
};

struct TriTraits1: public OpenMesh::DefaultTraits {
        typedef OpenMesh::Vec3d Point;
};
struct TriTraits2: public OpenMesh::DefaultTraits {
        typedef OpenMesh::Vec3d Point;
};

TEST_F(OpenMeshMeshCastTest, PerformCast) {
    OpenMesh::TriMesh_ArrayKernelT<TriTraits1> a;
    OpenMesh::TriMesh_ArrayKernelT<TriTraits2> &b =
            OpenMesh::mesh_cast<OpenMesh::TriMesh_ArrayKernelT<TriTraits2>&>(a);
Jan Möbius's avatar
Jan Möbius committed
24
    b.reserve(10,10,10);
25 26 27 28 29 30 31 32 33 34
    /*
    OpenMesh::TriMesh_ArrayKernelT < TriTraits2 > &b =
            OpenMesh::MeshCast<
                TriMesh_ArrayKernelT<TriTraits2>&,
                OpenMesh::TriMesh_ArrayKernelT<TriTraits1>&
            >::cast(a);
    */
}

}