Added clone. Don't like this ugly copy/paste thing all over :-(

release/4.3a0
dellaert 2014-02-02 22:39:09 -05:00
parent 8e9dd87d0b
commit a24d4ad3d1
1 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,11 @@ public:
virtual ~PoseRotationPrior() {}
/// @return a deep copy of this factor
virtual gtsam::NonlinearFactor::shared_ptr clone() const {
return boost::static_pointer_cast<gtsam::NonlinearFactor>(
gtsam::NonlinearFactor::shared_ptr(new This(*this))); }
// access
const Rotation& measured() const { return measured_; }