From a24d4ad3d1f83a3cf13cc2653353eaf3f9cb3e97 Mon Sep 17 00:00:00 2001 From: dellaert Date: Sun, 2 Feb 2014 22:39:09 -0500 Subject: [PATCH] Added clone. Don't like this ugly copy/paste thing all over :-( --- gtsam/slam/PoseRotationPrior.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtsam/slam/PoseRotationPrior.h b/gtsam/slam/PoseRotationPrior.h index 32acded48..7834f235f 100644 --- a/gtsam/slam/PoseRotationPrior.h +++ b/gtsam/slam/PoseRotationPrior.h @@ -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::shared_ptr(new This(*this))); } + // access const Rotation& measured() const { return measured_; }