Optional point

release/4.3a0
dellaert 2015-05-03 18:21:11 -07:00
parent cd077c336d
commit 3299127e6a
2 changed files with 8 additions and 0 deletions

View File

@ -383,6 +383,11 @@ class Point3 {
void serialize() const; void serialize() const;
}; };
class OptionalPoint3 {
bool is_initialized() const;
gtsam::Point3 value();
};
class Rot2 { class Rot2 {
// Standard Constructors and Named Constructors // Standard Constructors and Named Constructors
Rot2(); Rot2();

View File

@ -194,6 +194,9 @@ namespace gtsam {
/// Syntactic sugar for multiplying coordinates by a scalar s*p /// Syntactic sugar for multiplying coordinates by a scalar s*p
inline Point3 operator*(double s, const Point3& p) { return p*s;} inline Point3 operator*(double s, const Point3& p) { return p*s;}
// For MATLAB wrapper
typedef boost::optional<Point3> OptionalPoint3;
template<> template<>
struct traits<Point3> : public internal::VectorSpace<Point3> {}; struct traits<Point3> : public internal::VectorSpace<Point3> {};