]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/object.h
Add an abstraction for things that are attached to tracks
[r2c2.git] / source / 3d / object.h
index 8b9353d06e4b5879445a04e1ab31f670e7f4f1af..5696627f7e8e59a9285178dbdb43d6c13b939eea 100644 (file)
@@ -1,27 +1,30 @@
-/* $Id$
+#ifndef R2C2_3D_OBJECT_H_
+#define R2C2_3D_OBJECT_H_
 
-This file is part of the MSP Märklin suite
-Copyright © 2010  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
+#include <sigc++/trackable.h>
+#include <msp/gl/matrix.h>
+#include "libr2c2/geometry.h"
+#include "libr2c2/object.h"
 
-#ifndef MARKLIN3D_OBJECT_H_
-#define MARKLIN3D_OBJECT_H_
+namespace R2C2 {
 
-#include "libmarklin/geometry.h"
-
-namespace Marklin {
-
-class Object3D
+class Object3D: public sigc::trackable
 {
 protected:
-       Object3D() { }
+       Object &object;
+       Msp::GL::Matrix matrix;
+
+       Object3D(Object &);
 public:
        virtual ~Object3D() { }
 
-       virtual Point get_node() const = 0;
+       const Msp::GL::Matrix &get_matrix() const { return matrix; }
+       virtual Vector get_node() const = 0;
+       virtual bool is_visible() const = 0;
+protected:
+       virtual void moved();
 };
 
-} // namespace Marklin
+} // namespace R2C2
 
 #endif