Added static dim() functions to remaining geometry types so that dimensions can be calculated on size alone.

release/4.3a0
Alex Cunningham 2010-03-01 21:56:13 +00:00
parent e670e00e3b
commit 20ac6b85c8
3 changed files with 9 additions and 0 deletions

View File

@ -61,6 +61,9 @@ namespace gtsam {
Pose3 transform_to(const Pose3& pose) const;
/** get the dimension by the type */
static inline size_t dim() { return 6; };
private:
/** Serialization function */
friend class boost::serialization::access;

View File

@ -75,6 +75,9 @@ namespace gtsam {
/** rotate from world to rotated = R'*p */
Point2 unrotate(const Point2& p) const;
/** get the dimension by the type */
static inline size_t dim() { return 1; };
private:
/** Serialization function */
friend class boost::serialization::access;

View File

@ -106,6 +106,9 @@ namespace gtsam {
*/
Vector ypr() const;
/** get the dimension by the type */
static inline size_t dim() { return 3; };
private:
/** Serialization function */
friend class boost::serialization::access;