X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=blobdiff_plain;f=py%2Fdrawable.cpp;fp=py%2Fdrawable.cpp;h=1e926e43195f4856997c866aca50532f2a6fb492;hp=0000000000000000000000000000000000000000;hb=745bd381b0472a38a1e49bba52676c80eba52709;hpb=9c704ecd2ba1a01f0b82d0f1ea6d9d3e3011fff7 diff --git a/py/drawable.cpp b/py/drawable.cpp new file mode 100644 index 0000000..1e926e4 --- /dev/null +++ b/py/drawable.cpp @@ -0,0 +1,32 @@ +#include +#include +using namespace boost::python; + +#include "alg/drawable.hpp" + + +void export_drawable() +{ + class_("Drawable") + .def(init()) + //optional >()) + .add_property("x", &Drawable::x, &Drawable::setX, + "starting x (horizontal) coordinate") + .add_property("y", &Drawable::y, &Drawable::setY, + "starting y (vertical) coordinate") + .add_property("z", &Drawable::z, &Drawable::setZ, + "starting z (depth into/out of screen) coordinate") + .add_property("h", &Drawable::height, &Drawable::setHeight, + "how 'tall' our rectangle should be") + .add_property("color", &Drawable::color, &Drawable::setColor, + "color for this object") + + //void setDrawFunction(draw_func_ptr d) { draw_func = d; } + //draw_func_ptr drawFunction() const { return draw_func; } + ; + + register_ptr_to_python< DrawableRef >(); +} + + +