#define MARKLIN3D_TRACK_H_
#include <list>
-#include <msp/gl/color.h>
#include <msp/gl/renderable.h>
#include <msp/gl/vertexarray.h>
#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;
- Msp::GL::Color color;
+ Path3D *path;
public:
Track3D(Layout3D &, Track &);
Layout3D &get_layout() const { return layout; }
Track &get_track() const { return track; }
- void set_color(const Msp::GL::Color &);
+ 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;
};