X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fobject.cpp;fp=source%2F3d%2Fobject.cpp;h=fcbf2136e7158a98c2dbf7bfc00cd1529549a1cc;hb=f23c8d8cbc4e72b45e3a719b2cf974ce35d054e9;hp=0000000000000000000000000000000000000000;hpb=107a7f787d406f1f664c4986557f9a896e0845ea;p=r2c2.git diff --git a/source/3d/object.cpp b/source/3d/object.cpp new file mode 100644 index 0000000..fcbf213 --- /dev/null +++ b/source/3d/object.cpp @@ -0,0 +1,20 @@ +#include "object.h" + +using namespace Msp; + +namespace R2C2 { + +Object3D::Object3D(Object &o): + object(o) +{ + object.signal_moved.connect(sigc::mem_fun(this, &Object3D::moved)); +} + +void Object3D::moved() +{ + matrix = GL::Matrix::translation(object.get_position()); + matrix.rotate(object.get_rotation(), 0, 0, 1); + matrix.rotate(object.get_tilt(), 0, -1, 0); +} + +} // namespace R2C2