+bool Object::collide_ray(const Ray &ray) const
+{
+ const Shape *shape = get_type().get_shape();
+ if(!shape)
+ return false;
+
+ Transform reverse_trans = Transform::rotation(rotation, Vector(0, 0, -1))*
+ Transform::translation(-position);
+ return shape->check_intersection(reverse_trans.transform(ray));
+}
+
+BoundingBox Object::get_bounding_box() const
+{
+ const Shape *shape = get_type().get_shape();
+ if(!shape)
+ return BoundingBox();
+
+ Transform trans = Transform::translation(position)*
+ Transform::rotation(rotation, Vector(0, 0, 1));
+ return trans.transform(shape->get_axis_aligned_bounding_box());
+}
+