Use vectorize for initializing vector in dummy implementations

closes #59
This commit is contained in:
Jan Möbius
2019-01-17 08:08:09 +01:00
parent a5e04d48ef
commit a7e9657759
2 changed files with 21 additions and 4 deletions

View File

@@ -154,7 +154,15 @@ typename PolyMeshT<Kernel>::Normal
PolyMeshT<Kernel>::calc_face_normal_impl(FaceHandle, PointIsNot3DTag) const
{
// Dummy fallback implementation
return Normal(typename Normal::value_type(0));
// Returns just an initialized all 0 normal
// This function is only used if we don't hate a matching implementation
// for normal computation with the current vector type defined in the mesh traits
assert(false);
Normal normal;
vectorize(normal,0);
return normal;
}
//-----------------------------------------------------------------------------
@@ -212,7 +220,17 @@ template <class Kernel>
typename PolyMeshT<Kernel>::Normal
PolyMeshT<Kernel>::calc_face_normal_impl(const Point&, const Point&, const Point&, PointIsNot3DTag) const
{
return Normal(typename Normal::value_type(0));
// Dummy fallback implementation
// Returns just an initialized all 0 normal
// This function is only used if we don't hate a matching implementation
// for normal computation with the current vector type defined in the mesh traits
assert(false);
Normal normal;
vectorize(normal,0);
return normal;
}
//-----------------------------------------------------------------------------