1 #include <boost/python.hpp>
2 #include <boost/python/register_ptr_to_python.hpp>
3 using namespace boost::python;
5 #include "alg/drawable.hpp"
10 class_<Drawable>("Drawable")
11 .def(init<float, float, float, float, ColorRef>())
12 //optional<Drawable::draw_func_ptr> >())
13 .add_property("x", &Drawable::x, &Drawable::setX,
14 "starting x (horizontal) coordinate")
15 .add_property("y", &Drawable::y, &Drawable::setY,
16 "starting y (vertical) coordinate")
17 .add_property("z", &Drawable::z, &Drawable::setZ,
18 "starting z (depth into/out of screen) coordinate")
19 .add_property("h", &Drawable::height, &Drawable::setHeight,
20 "how 'tall' our rectangle should be")
21 .add_property("color", &Drawable::color, &Drawable::setColor,
22 "color for this object")
24 //void setDrawFunction(draw_func_ptr d) { draw_func = d; }
25 //draw_func_ptr drawFunction() const { return draw_func; }
28 register_ptr_to_python< DrawableRef >();