45 ShapeList shapes; |
45 ShapeList shapes; |
46 |
46 |
47 Container(): bbox(), shapes() {}; |
47 Container(): bbox(), shapes() {}; |
48 virtual ~Container() {}; |
48 virtual ~Container() {}; |
49 |
49 |
50 virtual void addShape(Shape* aShape); |
50 virtual void addShape(const Shape* aShape); |
51 //void addShapeNoExtend(Shape* aShape) { shapes.push_back(aShape); }; |
51 //void addShapeNoExtend(const Shape* aShape) { shapes.push_back(aShape); }; |
52 virtual Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray, |
52 virtual const Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray, |
53 Float &nearest_distance); |
53 Float &nearest_distance); |
54 |
54 |
55 virtual void optimize() {}; |
55 virtual void optimize() {}; |
56 |
56 |
57 ShapeList & getShapes() { return shapes; }; |
57 ShapeList & getShapes() { return shapes; }; |
58 |
58 |
59 virtual ostream & dump(ostream &st); |
59 virtual ostream & dump(ostream &st) const; |
60 |
60 |
61 #ifndef NO_SIMD |
61 #ifndef NO_SIMD |
62 virtual void packet_intersection(const Shape* const* origin_shapes, const RayPacket &rays, |
62 virtual void packet_intersection(const Shape* const* origin_shapes, const RayPacket &rays, |
63 Float *nearest_distances, Shape** nearest_shapes); |
63 Float *nearest_distances, const Shape** nearest_shapes); |
64 #endif |
64 #endif |
65 }; |
65 }; |
66 |
66 |
67 #endif |
67 #endif |