]> git.tdb.fi Git - r2c2.git/blob - source/3d/object.cpp
fcbf2136e7158a98c2dbf7bfc00cd1529549a1cc
[r2c2.git] / source / 3d / object.cpp
1 #include "object.h"
2
3 using namespace Msp;
4
5 namespace R2C2 {
6
7 Object3D::Object3D(Object &o):
8         object(o)
9 {
10         object.signal_moved.connect(sigc::mem_fun(this, &Object3D::moved));
11 }
12
13 void Object3D::moved()
14 {
15         matrix = GL::Matrix::translation(object.get_position());
16         matrix.rotate(object.get_rotation(), 0, 0, 1);
17         matrix.rotate(object.get_tilt(), 0, -1, 0);
18 }
19
20 } // namespace R2C2