Commit 4f7407fd authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

Add some initializations

  - in DistanceResult constructor, initialize nearestpoints and normal with
    NaN vectors,
  - in test_fcl_geometric_shapes.cpp, initialize plane with zero vectors.
parent c74b4c1b
......@@ -344,12 +344,12 @@ public:
/// @brief invalid contact primitive information
static const int NONE = -1;
DistanceResult(FCL_REAL min_distance_ = std::numeric_limits<FCL_REAL>::max()) : min_distance(min_distance_),
o1(NULL),
o2(NULL),
b1(NONE),
b2(NONE)
DistanceResult(FCL_REAL min_distance_ =
std::numeric_limits<FCL_REAL>::max()):
min_distance(min_distance_), o1(NULL), o2(NULL), b1(NONE), b2(NONE)
{
Vec3f nan; nan << sqrt (-1), sqrt (-1), sqrt (-1);
nearest_points [0] = nearest_points [1] = normal = nan;
}
......
......@@ -3836,8 +3836,8 @@ BOOST_AUTO_TEST_CASE(reversibleShapeDistance_allshapes)
Capsule capsule(5, 10);
Cone cone(5, 10);
Cylinder cylinder(5, 10);
Plane plane(Vec3f(), 0.0);
Halfspace halfspace(Vec3f(), 0.0);
Plane plane(Vec3f(0,0,0), 0.0);
Halfspace halfspace(Vec3f(0,0,0), 0.0);
// Use sufficiently long distance so that all the primitive shapes CANNOT intersect
FCL_REAL distance = 15.0;
......
Supports Markdown
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