Permalink
Browse files

Add linked body getter in Joint class.

  • Loading branch information...
1 parent 22b8031 commit 26e231948809f6d8befae0cd0150ba8f7ed41f20 Antonio El Khoury committed Oct 12, 2012
Showing with 8 additions and 0 deletions.
  1. +3 −0 include/ard/rbdl/model/joint.hh
  2. +5 −0 src/joint.cc
View
3 include/ard/rbdl/model/joint.hh
@@ -291,6 +291,9 @@ namespace ard
/// \brief Get a pointer to the linked body (if any).
virtual to_pointer<CjrlBody>::type linkedBody () const;
+ /// \brief Get a shared pointer to the linked body.
+ virtual void linkedBody (bodyShPtr_t& body) const;
+
/// \brief Link a body to the joint.
virtual void setLinkedBody (CjrlBody& inBody);
View
5 src/joint.cc
@@ -342,6 +342,11 @@ namespace ard
return linkedBody_;
}
+ void Joint::linkedBody (bodyShPtr_t& body) const
+ {
+ body = linkedBody_;
+ }
+
void Joint::setLinkedBody (CjrlBody& body)
{
bodyPtr_t bodyPtr;

0 comments on commit 26e2319

Please sign in to comment.