mode(SELECT),
manipulator(*this, root, selection),
measure(*this),
- camera_ctl(*this, root, camera),
- track_wrap(*this, selection)
+ camera_ctl(*this, root, camera)
{
window.set_title("Railway Designer");
window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &Designer::exit), 0));
pipeline->add_renderable_for_pass(layout_3d->get_scene(), 0);
if(base_object)
pipeline->add_renderable(*base_object);
- pipeline->add_renderable_for_pass(track_wrap, "unlit");
pipeline->add_renderable_for_pass(layout_3d->get_path_scene(), "unlit");
pipeline->add_renderable_for_pass(layout_3d->get_endpoint_scene(), "unlit");
statusbar->add(*lbl_status);
lbl_status->set_geometry(GLtk::Geometry(20, 2, 300, 16));
+ track_wrap = new TrackWrap(*layout_3d, selection);
+ pipeline->add_renderable_for_pass(*track_wrap, "unlit");
overlay = new Overlay3D(ui_res.get_default_font());
pipeline->add_renderable_for_pass(*overlay, "overlay");
#include <msp/gl/matrix.h>
#include <msp/gl/meshbuilder.h>
#include "3d/tracktype.h"
-#include "designer.h"
#include "selection.h"
#include "trackwrap.h"
using namespace Msp;
using namespace R2C2;
-TrackWrap::TrackWrap(Designer &d, Selection &s):
- designer(d),
+TrackWrap::TrackWrap(Layout3D &l, Selection &s):
+ layout(l),
selection(s)
{
selection.signal_changed.connect(sigc::mem_fun(this, &TrackWrap::selection_changed));
if(j!=meshes.end())
return *j->second;
- const TrackType3D &type3d = designer.get_layout_3d().get_catalogue().get_track(type);
+ const TrackType3D &type3d = layout.get_catalogue().get_track(type);
float min_area = -1;
float angle = 0;
#include <msp/gl/mesh.h>
#include <msp/gl/renderable.h>
#include "libr2c2/track.h"
+#include "3d/layout.h"
class Designer;
class Selection;
Msp::GL::Mesh *mesh;
};
- Designer &designer;
+ R2C2::Layout3D &layout;
Selection &selection;
std::map<const R2C2::TrackType *, Msp::GL::Mesh *> meshes;
std::list<Wrap> wraps;
public:
- TrackWrap(Designer &, Selection &);
+ TrackWrap(R2C2::Layout3D &, Selection &);
~TrackWrap();
virtual void render(const Msp::GL::Tag &) const;