no wrapping if typedef
parent
face1fe6fa
commit
a79be00dd6
|
@ -25,13 +25,16 @@
|
|||
using namespace boost::python;
|
||||
using namespace gtsam;
|
||||
|
||||
#ifndef GTSAM_TYPEDEF_POINTS_TO_VECTORS
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(print_overloads, Point2::print, 0, 1)
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(equals_overloads, Point2::equals, 1, 2)
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(compose_overloads, Point2::compose, 1, 3)
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(distance_overloads, Point2::distance, 1, 3)
|
||||
#endif
|
||||
|
||||
void exportPoint2(){
|
||||
|
||||
#ifndef GTSAM_TYPEDEF_POINTS_TO_VECTORS
|
||||
class_<Point2>("Point2", init<>())
|
||||
.def(init<double, double>())
|
||||
.def(init<const Vector2 &>())
|
||||
|
@ -54,5 +57,5 @@ void exportPoint2(){
|
|||
.def(repr(self))
|
||||
.def(self == self)
|
||||
;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -25,31 +25,32 @@
|
|||
using namespace boost::python;
|
||||
using namespace gtsam;
|
||||
|
||||
#ifndef GTSAM_TYPEDEF_POINTS_TO_VECTORS
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(print_overloads, Point3::print, 0, 1)
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(equals_overloads, Point3::equals, 1, 2)
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(norm_overloads, Point3::norm, 0, 1)
|
||||
#endif
|
||||
|
||||
void exportPoint3(){
|
||||
|
||||
#ifndef GTSAM_TYPEDEF_POINTS_TO_VECTORS
|
||||
class_<Point3>("Point3")
|
||||
.def(init<>())
|
||||
.def(init<double,double,double>())
|
||||
.def(init<const Vector3 &>())
|
||||
.def("identity", &Point3::identity)
|
||||
.staticmethod("identity")
|
||||
.def("cross", &Point3::cross)
|
||||
.def("distance", &Point3::distance)
|
||||
.def("dot", &Point3::dot)
|
||||
.def("equals", &Point3::equals, equals_overloads(args("q","tol")))
|
||||
.def("norm", &Point3::norm, norm_overloads(args("OptionalJacobian<1,3>")))
|
||||
.def("normalized", &Point3::normalized)
|
||||
.def("print", &Point3::print, print_overloads(args("s")))
|
||||
#ifndef GTSAM_TYPEDEF_POINTS_TO_VECTORS
|
||||
.def("vector", &Point3::vector, return_value_policy<copy_const_reference>())
|
||||
.def("x", &Point3::x)
|
||||
.def("y", &Point3::y)
|
||||
.def("z", &Point3::z)
|
||||
#endif
|
||||
.def("print", &Point3::print, print_overloads(args("s")))
|
||||
.def("equals", &Point3::equals, equals_overloads(args("q","tol")))
|
||||
.def("distance", &Point3::distance)
|
||||
.def("cross", &Point3::cross)
|
||||
.def("dot", &Point3::dot)
|
||||
.def("norm", &Point3::norm, norm_overloads(args("OptionalJacobian<1,3>")))
|
||||
.def("normalized", &Point3::normalized)
|
||||
.def("identity", &Point3::identity)
|
||||
.staticmethod("identity")
|
||||
.def(self * other<double>())
|
||||
.def(other<double>() * self)
|
||||
.def(self + self)
|
||||
|
@ -58,7 +59,10 @@ class_<Point3>("Point3")
|
|||
.def(self / other<double>())
|
||||
.def(self_ns::str(self))
|
||||
.def(repr(self))
|
||||
.def(self == self)
|
||||
;
|
||||
.def(self == self);
|
||||
#endif
|
||||
|
||||
class_<Point3Pair>("Point3Pair", init<Point3, Point3>())
|
||||
.def_readwrite("first", &Point3Pair::first)
|
||||
.def_readwrite("second", &Point3Pair::second);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue