| OpenMesh

OpenMesh::MeshCast< LhsMeshT, RhsMeshT > Struct Template Reference

Cast a mesh with different but identical traits into each other. More...

`#include <OpenMesh/Core/Mesh/FinalMeshItemsT.hh>`

## Detailed Description

### template<typename LhsMeshT, typename RhsMeshT>
struct OpenMesh::MeshCast< LhsMeshT, RhsMeshT >

Cast a mesh with different but identical traits into each other.

Note that there exists a syntactically more convenient global method mesh_cast().

Example:

struct TriTraits1 : public OpenMesh::DefaultTraits {
typedef Vec3d Point;
};
struct TriTraits2 : public OpenMesh::DefaultTraits {
typedef Vec3d Point;
};
struct TriTraits3 : public OpenMesh::DefaultTraits {
typedef Vec3f Point;
};
TriMesh_ArrayKernelT<TriTraits1> a;
TriMesh_ArrayKernelT<TriTraits2> &b = MeshCast<TriMesh_ArrayKernelT<TriTraits2>&, TriMesh_ArrayKernelT<TriTraits1>&>::cast(a); // OK
TriMesh_ArrayKernelT<TriTraits3> &c = MeshCast<TriMesh_ArrayKernelT<TriTraits3>&, TriMesh_ArrayKernelT<TriTraits1>&>::cast(a); // ERROR

See also
  mesh_cast()

Parameters

  rhs |

Returns

The documentation for this struct was generated from the following file:

- OpenMesh/Core/Mesh/FinalMeshItemsT.hh