X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fobject.h;h=aa6ce80aaf81641a05b1df13d420852240fbfeb1;hb=bb7e754473aea2083c406b94060b9982c66f7473;hp=8b9353d06e4b5879445a04e1ab31f670e7f4f1af;hpb=dcfa1e9503b7e97b61396d7458f0b2e5896779cd;p=r2c2.git diff --git a/source/3d/object.h b/source/3d/object.h index 8b9353d..aa6ce80 100644 --- a/source/3d/object.h +++ b/source/3d/object.h @@ -1,27 +1,36 @@ -/* $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 +#include +#include "libr2c2/geometry.h" +#include "libr2c2/object.h" -#ifndef MARKLIN3D_OBJECT_H_ -#define MARKLIN3D_OBJECT_H_ +namespace R2C2 { -#include "libmarklin/geometry.h" +class Layout3D; -namespace Marklin { - -class Object3D +class Object3D: public sigc::trackable { protected: - Object3D() { } + Layout3D &layout; + Object &object; + Msp::GL::Matrix matrix; + + Object3D(Layout3D &, Object &); public: - virtual ~Object3D() { } + virtual ~Object3D(); - virtual Point get_node() const = 0; + Layout3D &get_layout() const { return layout; } + Object &get_object() const { return object; } + + 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