52#ifndef OPENMESH_VECTORCAST_HH
53#define OPENMESH_VECTORCAST_HH
59#include <OpenMesh/Core/System/config.h>
60#include <OpenMesh/Core/Utils/vector_traits.hh>
61#include <OpenMesh/Core/Utils/GenProg.hh>
62#include <OpenMesh/Core/Geometry/VectorT.hh>
80template <
typename src_t,
typename dst_t,
int n>
81inline void vector_cast(
const src_t &_src, dst_t &_dst, GenProg::Int2Type<n> )
88template <
typename src_t,
typename dst_t>
89inline void vector_cast(
const src_t & , dst_t & , GenProg::Int2Type<0> )
93template <
typename src_t,
typename dst_t,
int n>
94inline void vector_copy(
const src_t &_src, dst_t &_dst, GenProg::Int2Type<n> )
98 _dst[n-1] = _src[n-1];
101template <
typename src_t,
typename dst_t>
102inline void vector_copy(
const src_t & , dst_t & , GenProg::Int2Type<0> )
109#ifndef DOXY_IGNORE_THIS
111template <
typename dst_t,
typename src_t>
114 typedef dst_t return_type;
116 inline static return_type cast(
const src_t& _src)
124#if !defined(OM_CC_MSVC)
125template <
typename dst_t>
126struct vector_caster<dst_t,dst_t>
128 typedef const dst_t& return_type;
130 inline static return_type cast(
const dst_t& _src)
142template <
typename dst_t,
typename src_t>
144typename vector_caster<dst_t, src_t>::return_type
147 return vector_caster<dst_t, src_t>::cast(_src);
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
void vector_cast(const src_t &_src, dst_t &_dst, GenProg::Int2Type< n >)
Cast vector type to another vector type by copying the vector elements.
Definition: vector_cast.hh:81
void vector_copy(const src_t &_src, dst_t &_dst, GenProg::Int2Type< n >)
Cast vector type to another vector type by copying the vector elements.
Definition: vector_cast.hh:94
Helper class providing information about a vector type.
Definition: vector_traits.hh:89
T::value_type value_type
Type of the scalar value.
Definition: vector_traits.hh:94
static const size_t size_
size/dimension of the vector
Definition: vector_traits.hh:97