Added static dim() functions to remaining geometry types so that dimensions can be calculated on size alone.
parent
e670e00e3b
commit
20ac6b85c8
|
@ -61,6 +61,9 @@ namespace gtsam {
|
||||||
|
|
||||||
Pose3 transform_to(const Pose3& pose) const;
|
Pose3 transform_to(const Pose3& pose) const;
|
||||||
|
|
||||||
|
/** get the dimension by the type */
|
||||||
|
static inline size_t dim() { return 6; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Serialization function */
|
/** Serialization function */
|
||||||
friend class boost::serialization::access;
|
friend class boost::serialization::access;
|
||||||
|
|
|
@ -75,6 +75,9 @@ namespace gtsam {
|
||||||
/** rotate from world to rotated = R'*p */
|
/** rotate from world to rotated = R'*p */
|
||||||
Point2 unrotate(const Point2& p) const;
|
Point2 unrotate(const Point2& p) const;
|
||||||
|
|
||||||
|
/** get the dimension by the type */
|
||||||
|
static inline size_t dim() { return 1; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Serialization function */
|
/** Serialization function */
|
||||||
friend class boost::serialization::access;
|
friend class boost::serialization::access;
|
||||||
|
|
|
@ -106,6 +106,9 @@ namespace gtsam {
|
||||||
*/
|
*/
|
||||||
Vector ypr() const;
|
Vector ypr() const;
|
||||||
|
|
||||||
|
/** get the dimension by the type */
|
||||||
|
static inline size_t dim() { return 3; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Serialization function */
|
/** Serialization function */
|
||||||
friend class boost::serialization::access;
|
friend class boost::serialization::access;
|
||||||
|
|
Loading…
Reference in New Issue