Commit f6d80a8 1 parent d57118a commit f6d80a8 Copy full SHA for f6d80a8
File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -593,6 +593,26 @@ struct HPP_FCL_DLLAPI ContactPatch {
593
593
return point;
594
594
}
595
595
596
+ // / @brief Get the i-th point of the set, projected back onto the first shape
597
+ // / of the collision pair. This point is expressed in the 3D reference frame.
598
+ Vec3f getPointShape1 (const size_t i) const {
599
+ Vec3f point (0 , 0 , 0 );
600
+ point.head <2 >() = this ->point (i);
601
+ point =
602
+ tf.transform (point) - (this ->penetration_depth / 2 ) * this ->getNormal ();
603
+ return point;
604
+ }
605
+
606
+ // / @brief Get the i-th point of the set, projected back onto the first shape
607
+ // / of the collision pair.
608
+ Vec3f getPointShape2 (const size_t i) const {
609
+ Vec3f point (0 , 0 , 0 );
610
+ point.head <2 >() = this ->point (i);
611
+ point =
612
+ tf.transform (point) + (this ->penetration_depth / 2 ) * this ->getNormal ();
613
+ return point;
614
+ }
615
+
596
616
// / @brief Getter for the 2D points in the set.
597
617
Polygon& points () { return this ->m_points ; }
598
618
Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ void exposeContactPatchAPI() {
77
77
.DEF_CLASS_FUNC (ContactPatch, getNormal)
78
78
.DEF_CLASS_FUNC (ContactPatch, addPoint)
79
79
.DEF_CLASS_FUNC (ContactPatch, getPoint)
80
+ .DEF_CLASS_FUNC (ContactPatch, getPointShape1)
81
+ .DEF_CLASS_FUNC (ContactPatch, getPointShape2)
80
82
.DEF_CLASS_FUNC (ContactPatch, clear)
81
83
.DEF_CLASS_FUNC (ContactPatch, isSame);
82
84
}
You can’t perform that action at this time.
0 commit comments