Yet another overload fix in python wrapper
parent
df4efbf2d7
commit
a9b0d81be4
|
@ -109,6 +109,15 @@ class GTSAM_EXPORT Point3 : public Vector3 {
|
||||||
/// return as Vector3
|
/// return as Vector3
|
||||||
const Vector3& vector() const { return *this; }
|
const Vector3& vector() const { return *this; }
|
||||||
|
|
||||||
|
/// get x
|
||||||
|
inline double x() const {return (*this)[0];}
|
||||||
|
|
||||||
|
/// get y
|
||||||
|
inline double y() const {return (*this)[1];}
|
||||||
|
|
||||||
|
/// get z
|
||||||
|
inline double z() const {return (*this)[2];}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// Output stream operator
|
/// Output stream operator
|
||||||
|
|
|
@ -43,13 +43,13 @@ class_<Point3>("Point3")
|
||||||
.def("norm", &Point3::norm)
|
.def("norm", &Point3::norm)
|
||||||
.def("normalized", &Point3::normalized)
|
.def("normalized", &Point3::normalized)
|
||||||
.def("print", &Point3::print, print_overloads(args("s")))
|
.def("print", &Point3::print, print_overloads(args("s")))
|
||||||
#ifndef GTSAM_USE_VECTOR3_POINTS
|
#ifdef GTSAM_USE_VECTOR3_POINTS
|
||||||
|
.def("vector", &Point3::vector, return_value_policy<copy_const_reference>())
|
||||||
|
#else
|
||||||
.def("vector", &Point3::vector)
|
.def("vector", &Point3::vector)
|
||||||
.def("x", &Point3::x)
|
.def("x", &Point3::x)
|
||||||
.def("y", &Point3::y)
|
.def("y", &Point3::y)
|
||||||
.def("z", &Point3::z)
|
.def("z", &Point3::z)
|
||||||
#else
|
|
||||||
.def("vector", &Point3::vector, return_value_policy<copy_const_reference>())
|
|
||||||
#endif
|
#endif
|
||||||
.def(self * other<double>())
|
.def(self * other<double>())
|
||||||
.def(other<double>() * self)
|
.def(other<double>() * self)
|
||||||
|
|
Loading…
Reference in New Issue