Commit a9e58c96 authored by Justin Carpentier's avatar Justin Carpentier

geom: add operator== in GeometryModel

parent 27157a12
......@@ -29,20 +29,11 @@ namespace pinocchio
typedef SE3Tpl<Scalar,Options> SE3;
typedef ::pinocchio::GeometryObject GeometryObject;
typedef container::aligned_vector<GeometryObject> GeometryObjectVector;
typedef std::vector<CollisionPair> CollisionPairVector;
typedef pinocchio::GeomIndex GeomIndex;
/// \brief The number of GeometryObjects
Index ngeoms;
/// \brief Vector of GeometryObjects used for collision computations
GeometryObjectVector geometryObjects;
///
/// \brief Vector of collision pairs.
///
CollisionPairVector collisionPairs;
GeometryModel()
: ngeoms(0)
......@@ -141,8 +132,32 @@ namespace pinocchio
PairIndex findCollisionPair(const CollisionPair & pair) const;
#endif // PINOCCHIO_WITH_HPP_FCL
///
/// \brief Returns true if *this and other are equal.
///
bool operator==(const GeometryModel & other)
{
return
ngeoms == other.ngeoms
&& geometryObjects == other.geometryObjects
&& collisionPairs == other.collisionPairs
;
}
friend std::ostream& operator<<(std::ostream & os,
const GeometryModel & model_geom);
/// \brief The number of GeometryObjects
Index ngeoms;
friend std::ostream& operator<<(std::ostream & os, const GeometryModel & model_geom);
/// \brief Vector of GeometryObjects used for collision computations
GeometryObjectVector geometryObjects;
///
/// \brief Vector of collision pairs.
///
CollisionPairVector collisionPairs;
}; // struct GeometryModel
struct GeometryData
......
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