#include "beamgate.h"
#include "layout.h"
#include "signal.h"
+#include "terrain.h"
#include "track.h"
#include "utility.h"
#include "vehicle.h"
Geometry::BoundingBox<float, 3> bbox;
for(ObjectMap::const_iterator i=objects.begin(); i!=objects.end(); ++i)
- bbox = bbox|i->second->get_object().get_type().get_shape()->get_axis_aligned_bounding_box();
+ {
+ const Shape *shape = i->second->get_object().get_shape();
+ if(shape)
+ bbox = bbox|shape->get_axis_aligned_bounding_box();
+ }
minp = bbox.get_minimum_point();
maxp = bbox.get_maximum_point();
new Vehicle3D(*this, *v);
else if(BeamGate *g = dynamic_cast<BeamGate *>(&o))
new BeamGate3D(*this, *g);
+ else if(Terrain *r = dynamic_cast<Terrain *>(&o))
+ new Terrain3D(*this, *r);
}
void Layout3D::object_removed(Object &o)