X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Ftrack.h;h=641f234e232f4b926fa07936d85bd996ab092cd1;hb=7a36d396eded897c421424905b2c938d770df341;hp=9928e11449345d2c0f453e8889913dc12058696d;hpb=48dff17ed3144d944965e7cb534e1f8fb92bd620;p=r2c2.git diff --git a/source/3d/track.h b/source/3d/track.h index 9928e11..641f234 100644 --- a/source/3d/track.h +++ b/source/3d/track.h @@ -1,33 +1,29 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - -#ifndef MARKLIN3D_TRACK_H_ -#define MARKLIN3D_TRACK_H_ +#ifndef R2C2_3D_TRACK_H_ +#define R2C2_3D_TRACK_H_ #include -#include -#include -#include -#include "libmarklin/track.h" -#include "libmarklin/trackpart.h" +#include +#include +#include +#include "libr2c2/track.h" +#include "libr2c2/trackpart.h" +#include "object.h" -namespace Marklin { +namespace R2C2 { class Endpoint3D; class Layout3D; +class Path3D; class TrackType3D; -class Track3D: public Msp::GL::Renderable +class Track3D: public Object3D, public Msp::GL::ObjectInstance, public sigc::trackable { private: Layout3D &layout; Track &track; const TrackType3D &type; std::vector endpoints; + Path3D *path; public: Track3D(Layout3D &, Track &); @@ -36,11 +32,18 @@ public: Layout3D &get_layout() const { return layout; } Track &get_track() const { return track; } const TrackType3D &get_type() const { return type; } - void get_bounds(float, Point &, Point &) const; + void get_bounds(const Angle &, Vector &, Vector &) const; + Path3D &get_path() { return *path; } - virtual void render(const Msp::GL::Tag &) const; + virtual Vector get_node() const; + virtual bool is_visible() const { return true; } + + Msp::GL::Matrix create_matrix() const; + virtual void setup_render(Msp::GL::Renderer &, const Msp::GL::Tag &) const; +private: + void link_changed(unsigned, Track *); }; -} // namespace Marklin +} // namespace R2C2 #endif