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
VectorT< double, 3 > Vec3d
3-double vector
Definition: Vector11T.hh:852
VectorT< float, 3 > Vec3f
3-float vector
Definition: Vector11T.hh:850
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:

Project OpenMesh, ©  Visual Computing Institute, RWTH Aachen. Documentation generated using doxygen .