Commit 6575624e authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[ContinuousValidation] Implement copy of collision pairs.

parent 795b00f0
......@@ -92,6 +92,8 @@ namespace hpp {
virtual std::ostream& print (std::ostream& os) const = 0;
virtual BodyPairCollisionPtr_t copy () const = 0;
protected:
/// Constructor of body pair collision
///
......@@ -101,6 +103,11 @@ namespace hpp {
{
}
/// Copy constructor
BodyPairCollision (const BodyPairCollision& other):
IntervalValidation(other), m_(other.m_), maximalVelocity_(0)
{}
virtual void setReport (CollisionValidationReportPtr_t& report,
fcl::CollisionResult result,
CollisionPair_t _pair) const
......
......@@ -99,6 +99,12 @@ namespace hpp {
}
}
IntervalValidation (const IntervalValidation& other) :
tolerance_(other.tolerance_), refine_(true)
{
assert (tolerance_ > 0);
}
private:
virtual void setupPath() = 0;
}; // class IntervalValidation
......
......@@ -110,6 +110,8 @@ namespace hpp {
return (m_->joint_b ? m_->joint_b->index() : 0);
}
BodyPairCollisionPtr_t copy () const;
protected:
/// Constructor of inter-body collision checking
///
......@@ -130,6 +132,10 @@ namespace hpp {
const ConstObjectStdVector_t& objects_b,
value_type tolerance);
SolidSolidCollision (const SolidSolidCollision& other)
: BodyPairCollision (other), m_ (other.m_)
{}
private:
typedef pinocchio::JointIndex JointIndex;
typedef std::vector<JointIndex> JointIndices_t;
......
......@@ -50,6 +50,11 @@ namespace hpp {
return shPtr;
}
BodyPairCollisionPtr_t SolidSolidCollision::copy () const
{
return BodyPairCollisionPtr_t(new SolidSolidCollision(*this));
}
value_type SolidSolidCollision::computeMaximalVelocity(vector_t& Vb) const
{
value_type maximalVelocity = 0;
......
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