-/* $Id$
-
-This file is part of the MSP Märklin suite
-Copyright © 2010 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
-#ifndef MARKLIN3D_PATH_H_
-#define MARKLIN3D_PATH_H_
+#ifndef R2C2_3D_PATH_H_
+#define R2C2_3D_PATH_H_
#include <msp/gl/color.h>
#include <msp/gl/mesh.h>
#include <msp/gl/renderable.h>
+#include "utility.h"
-namespace Marklin {
+namespace R2C2 {
class Track3D;
-class Path3D: public Msp::GL::Renderable
+class Path3D: public Utility3D, public Msp::GL::Renderable, public sigc::trackable
{
private:
const Track3D &track;
- unsigned paths;
+ int path;
+ int side;
bool automatic;
+ const Msp::GL::Mesh *mesh;
Msp::GL::Color color;
+ float z_offs;
public:
Path3D(const Track3D &);
~Path3D();
void set_automatic();
- void set_path(unsigned);
- void set_mask(unsigned);
+ void set_path(int);
+ void set_side(int);
void set_color(const Msp::GL::Color &);
+ void set_layer(float);
+private:
+ void path_changed(unsigned);
+ void update_mesh();
+
+public:
+ virtual long get_instance_key() const;
- virtual void render(const Msp::GL::Tag &) const;
+ virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
};
-} // namespace Marklin
+} // namespace R2C2
#endif