Open taiti22 opened 1 year ago
In first_hit.cpp, the 'objects' parameter is defined as: const std::vector< std::shared_ptr<Object> > & objects. What is the purpose of using shared_ptrs here? Why it is a vector of shared_ptrs to objects, instead of just a vector of objects?
const std::vector< std::shared_ptr<Object> > & objects
In first_hit.cpp, the 'objects' parameter is defined as:
const std::vector< std::shared_ptr<Object> > & objects
. What is the purpose of using shared_ptrs here? Why it is a vector of shared_ptrs to objects, instead of just a vector of objects?