catalogue(layout.get_catalogue())
{
// South, 15° from zenith
- sun.set_position(0, -0.259, 0.966, 0);
+ sun.set_position(GL::Vector4(0, -0.259, 0.966, 0));
sun.set_diffuse(GL::Color(0.9));
lighting.set_ambient(GL::Color(0.4));
lighting.attach(0, sun);
delete objects.begin()->second;
}
-void Layout3D::get_bounds(Vector &minp, Vector &maxp) const
-{
- Geometry::BoundingBox<float, 3> bbox;
-
- for(ObjectMap::const_iterator i=objects.begin(); i!=objects.end(); ++i)
- {
- 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();
-}
-
void Layout3D::add(Object3D &o)
{
insert_unique(objects, &o.get_object(), &o);