Commit 7fff526d authored by Jan Möbius's avatar Jan Möbius

Merge branch 'vectorize_warning' into 'master'

Fixed vectorize warning

See merge request !224
parents 0d04d4f4 37523c16
...@@ -145,7 +145,7 @@ MeshViewerWidgetT<M>::open_mesh(const char* _filename, IO::Options _opt) ...@@ -145,7 +145,7 @@ MeshViewerWidgetT<M>::open_mesh(const char* _filename, IO::Options _opt)
// set center and radius // set center and radius
set_scene_pos( (bbMin+bbMax)*0.5, (bbMin-bbMax).norm()*0.5 ); set_scene_pos( (bbMin+bbMax)*0.5f, (bbMin-bbMax).norm()*0.5f );
// for normal display // for normal display
normal_scale_ = (bbMax-bbMin).min()*0.05f; normal_scale_ = (bbMax-bbMin).min()*0.05f;
......
...@@ -155,13 +155,13 @@ PolyMeshT<Kernel>::calc_face_normal_impl(FaceHandle, PointIsNot3DTag) const ...@@ -155,13 +155,13 @@ PolyMeshT<Kernel>::calc_face_normal_impl(FaceHandle, PointIsNot3DTag) const
{ {
// Dummy fallback implementation // Dummy fallback implementation
// Returns just an initialized all 0 normal // Returns just an initialized all 0 normal
// This function is only used if we don't hate a matching implementation // This function is only used if we don't have a matching implementation
// for normal computation with the current vector type defined in the mesh traits // for normal computation with the current vector type defined in the mesh traits
assert(false); assert(false);
Normal normal; Normal normal;
vectorize(normal,Scalar(0.0)); vectorize(normal,Scalar(0));
return normal; return normal;
} }
...@@ -223,13 +223,13 @@ PolyMeshT<Kernel>::calc_face_normal_impl(const Point&, const Point&, const Point ...@@ -223,13 +223,13 @@ PolyMeshT<Kernel>::calc_face_normal_impl(const Point&, const Point&, const Point
// Dummy fallback implementation // Dummy fallback implementation
// Returns just an initialized all 0 normal // Returns just an initialized all 0 normal
// This function is only used if we don't hate a matching implementation // This function is only used if we don't have a matching implementation
// for normal computation with the current vector type defined in the mesh traits // for normal computation with the current vector type defined in the mesh traits
assert(false); assert(false);
Normal normal; Normal normal;
vectorize(normal,Scalar(0.0)); vectorize(normal,Scalar(0));
return normal; return normal;
} }
...@@ -241,7 +241,7 @@ PolyMeshT<Kernel>:: ...@@ -241,7 +241,7 @@ PolyMeshT<Kernel>::
calc_face_centroid(FaceHandle _fh) const calc_face_centroid(FaceHandle _fh) const
{ {
Point _pt; Point _pt;
vectorize(_pt, Scalar(0.0)); vectorize(_pt, Scalar(0));
Scalar valence = 0.0; Scalar valence = 0.0;
for (ConstFaceVertexIter cfv_it = this->cfv_iter(_fh); cfv_it.is_valid(); ++cfv_it, valence += 1.0) for (ConstFaceVertexIter cfv_it = this->cfv_iter(_fh); cfv_it.is_valid(); ++cfv_it, valence += 1.0)
{ {
...@@ -404,7 +404,7 @@ template <class Kernel> ...@@ -404,7 +404,7 @@ template <class Kernel>
void PolyMeshT<Kernel>:: void PolyMeshT<Kernel>::
calc_vertex_normal_fast(VertexHandle _vh, Normal& _n) const calc_vertex_normal_fast(VertexHandle _vh, Normal& _n) const
{ {
vectorize(_n,Scalar(0.0)); vectorize(_n, Scalar(0));
for (ConstVertexFaceIter vf_it = this->cvf_iter(_vh); vf_it.is_valid(); ++vf_it) for (ConstVertexFaceIter vf_it = this->cvf_iter(_vh); vf_it.is_valid(); ++vf_it)
_n += this->normal(*vf_it); _n += this->normal(*vf_it);
} }
...@@ -414,7 +414,7 @@ template <class Kernel> ...@@ -414,7 +414,7 @@ template <class Kernel>
void PolyMeshT<Kernel>:: void PolyMeshT<Kernel>::
calc_vertex_normal_correct(VertexHandle _vh, Normal& _n) const calc_vertex_normal_correct(VertexHandle _vh, Normal& _n) const
{ {
vectorize(_n, Scalar(0.0)); vectorize(_n, Scalar(0));
ConstVertexIHalfedgeIter cvih_it = this->cvih_iter(_vh); ConstVertexIHalfedgeIter cvih_it = this->cvih_iter(_vh);
if (! cvih_it.is_valid() ) if (! cvih_it.is_valid() )
{//don't crash on isolated vertices {//don't crash on isolated vertices
......
...@@ -256,7 +256,7 @@ collapse_priority(const CollapseInfo& _ci) ...@@ -256,7 +256,7 @@ collapse_priority(const CollapseInfo& _ci)
// undo simulation changes // undo simulation changes
mesh_.set_point(_ci.v0, _ci.p0); mesh_.set_point(_ci.v0, _ci.p0);
return ( ok ? Base::LEGAL_COLLAPSE : Base::ILLEGAL_COLLAPSE ); return ( ok ? static_cast<float>(Base::LEGAL_COLLAPSE) : static_cast<float>(Base::ILLEGAL_COLLAPSE) );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -576,7 +576,7 @@ void CompositeT<MeshType,RealType>::FVc(Coeff& _coeff) ...@@ -576,7 +576,7 @@ void CompositeT<MeshType,RealType>::FVc(Coeff& _coeff)
++valence; ++valence;
} }
c = static_cast<real_t>(_coeff(valence)); c = static_cast<scalar_t>(_coeff(valence));
for (voh_it = mesh_.voh_iter(*v_it); voh_it.is_valid(); ++voh_it) { for (voh_it = mesh_.voh_iter(*v_it); voh_it.is_valid(); ++voh_it) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment