]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/track.h
Do not render unplaced vehicles
[r2c2.git] / source / 3d / track.h
index 9928e11449345d2c0f453e8889913dc12058696d..e55dc21245f146920115c4719acc63267bf54142 100644 (file)
@@ -14,20 +14,23 @@ Distributed under the GPL
 #include <msp/gl/vertexarraybuilder.h>
 #include "libmarklin/track.h"
 #include "libmarklin/trackpart.h"
+#include "object.h"
 
 namespace Marklin {
 
 class Endpoint3D;
 class Layout3D;
+class Path3D;
 class TrackType3D;
 
-class Track3D: public Msp::GL::Renderable
+class Track3D: public Object3D, public Msp::GL::Renderable
 {
 private:
        Layout3D &layout;
        Track &track;
        const TrackType3D &type;
        std::vector<Endpoint3D *> endpoints;
+       Path3D *path;
 
 public:
        Track3D(Layout3D &, Track &);
@@ -37,7 +40,12 @@ public:
        Track &get_track() const { return track; }
        const TrackType3D &get_type() const { return type; }
        void get_bounds(float, Point &, Point &) const;
+       Path3D &get_path() { return *path; }
 
+       virtual Point get_node() const;
+       virtual bool is_visible() const { return true; }
+
+       void apply_matrix() const;
        virtual void render(const Msp::GL::Tag &) const;
 };