include/container.h
branchpyrit
changeset 95 ca7d4c665531
parent 94 4c8abb8977dc
child 98 64638385798a
equal deleted inserted replaced
94:4c8abb8977dc 95:ca7d4c665531
    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