Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2022 INRIA |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#ifndef __pinocchio_multibody_geometry_object_filter_hpp__ |
6 |
|
|
#define __pinocchio_multibody_geometry_object_filter_hpp__ |
7 |
|
|
|
8 |
|
|
#include "pinocchio/multibody/instance-filter.hpp" |
9 |
|
|
|
10 |
|
|
namespace pinocchio |
11 |
|
|
{ |
12 |
|
|
|
13 |
|
|
struct GeometryObjectFilterBase : InstanceFilterBase<GeometryObject> |
14 |
|
|
{ |
15 |
|
|
|
16 |
|
|
}; // struct GeometryObjectFilterBase |
17 |
|
|
|
18 |
|
|
struct GeometryObjectFilterNothing final : GeometryObjectFilterBase |
19 |
|
|
{ |
20 |
|
✗ |
bool operator()(const GeometryObject &) const |
21 |
|
|
{ |
22 |
|
✗ |
return true; |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
}; // struct GeometryObjectFilterNothing |
26 |
|
|
|
27 |
|
|
struct GeometryObjectFilterSelectByJoint final : GeometryObjectFilterBase |
28 |
|
|
{ |
29 |
|
✗ |
GeometryObjectFilterSelectByJoint(const size_t joint_id) |
30 |
|
✗ |
: joint_id(joint_id) |
31 |
|
|
{ |
32 |
|
|
} |
33 |
|
|
|
34 |
|
✗ |
bool operator()(const GeometryObject & geometry_object) const |
35 |
|
|
{ |
36 |
|
✗ |
return geometry_object.parentJoint == joint_id; |
37 |
|
|
} |
38 |
|
|
|
39 |
|
|
const size_t joint_id; |
40 |
|
|
|
41 |
|
|
}; // struct GeometryObjectFilterSelectByJoint |
42 |
|
|
|
43 |
|
|
} // namespace pinocchio |
44 |
|
|
|
45 |
|
|
#endif // #ifndef __pinocchio_multibody_geometry_object_filter_hpp__ |
46 |
|
|
|