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

| OpenMesh

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

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

## 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
OpenMesh::Vec3d
VectorT< double, 3 > Vec3d
3-double vector
Definition: Vector11T.hh:852
OpenMesh::Vec3f
VectorT< float, 3 > Vec3f
3-float vector
Definition: Vector11T.hh:850
OpenMesh::DefaultTraits
Base class for all traits.
Definition: Traits.hh:122

See also
  mesh_cast()

Parameters

  rhs |

Returns

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

- OpenMesh/Core/Mesh/FinalMeshItemsT.hh