@@ -368,15 +368,15 @@ BOOST_AUTO_TEST_CASE(halfspace_cone) {
368
368
const FCL_REAL tol = 1e-6 ;
369
369
EIGEN_VECTOR_IS_APPROX (contact.normal , hspace.n , tol);
370
370
371
- const size_t expected_size = 6 ;
371
+ const size_t expected_size = ContactPatch::default_preallocated_size ;
372
372
ContactPatch expected (expected_size);
373
373
expected.tf .rotation () = constructBasisFromVector (contact.normal );
374
374
expected.tf .translation () = contact.pos ;
375
375
expected.penetration_depth = contact.penetration_depth ;
376
- std::array<Vec3f, 6 > points;
376
+ std::array<Vec3f, ContactPatch::default_preallocated_size > points;
377
377
const FCL_REAL angle_increment =
378
378
2.0 * (FCL_REAL)(EIGEN_PI) / ((FCL_REAL)(6 ));
379
- for (size_t i = 0 ; i < 6 ; ++i) {
379
+ for (size_t i = 0 ; i < ContactPatch::default_preallocated_size ; ++i) {
380
380
const FCL_REAL theta = (FCL_REAL)(i)*angle_increment;
381
381
Vec3f point_on_cone_base (std::cos (theta) * cone.radius ,
382
382
std::sin (theta) * cone.radius , -cone.halfLength );
@@ -475,16 +475,16 @@ BOOST_AUTO_TEST_CASE(halfspace_cylinder) {
475
475
476
476
if (col_res.isCollision ()) {
477
477
const Contact& contact = col_res.getContact (0 );
478
- const size_t expected_size = 6 ;
478
+ const size_t expected_size = ContactPatch::default_preallocated_size ;
479
479
const FCL_REAL tol = 1e-6 ;
480
480
ContactPatch expected (expected_size);
481
481
expected.tf .rotation () = constructBasisFromVector (contact.normal );
482
482
expected.tf .translation () = contact.pos ;
483
483
expected.penetration_depth = contact.penetration_depth ;
484
- std::array<Vec3f, 6 > points;
484
+ std::array<Vec3f, ContactPatch::default_preallocated_size > points;
485
485
const FCL_REAL angle_increment =
486
486
2.0 * (FCL_REAL)(EIGEN_PI) / ((FCL_REAL)(6 ));
487
- for (size_t i = 0 ; i < 6 ; ++i) {
487
+ for (size_t i = 0 ; i < ContactPatch::default_preallocated_size ; ++i) {
488
488
const FCL_REAL theta = (FCL_REAL)(i)*angle_increment;
489
489
Vec3f point_on_cone_base (std::cos (theta) * cylinder.radius ,
490
490
std::sin (theta) * cylinder.radius ,
0 commit comments