/* $Id$
-This file is part of the MSP Märklin suite
+This file is part of R²C²
Copyright © 2010 Mikkosoft Productions, Mikko Rasa
Distributed under the GPL
*/
using namespace std;
using namespace Msp;
-using namespace Marklin;
+using namespace R2C2;
TrackWrap::TrackWrap(Designer &d, Selection &s):
designer(d),
selection.signal_changed.connect(sigc::mem_fun(this, &TrackWrap::selection_changed));
}
+TrackWrap::~TrackWrap()
+{
+ for(map<const TrackType *, GL::Mesh *>::iterator i=meshes.begin(); i!=meshes.end(); ++i)
+ delete i->second;
+}
+
void TrackWrap::render(const GL::Tag &) const
{
for(list<Wrap>::const_iterator i=wraps.begin(); i!=wraps.end(); ++i)
if(j!=meshes.end())
return *j->second;
- const TrackType3D &type3d = designer.get_layout_3d()->get_catalogue().get_track(type);
+ const TrackType3D &type3d = designer.get_layout_3d().get_catalogue().get_track(type);
float min_area = -1;
- float angle;
+ float angle = 0;
Point center;
- float width;
- float height;
+ float width = 0;
+ float height = 0;
for(float a=0; a<M_PI; a+=0.01)
{
Point minp, maxp;