Use shared_ptr for Scene::mCamera

Makes memory management a bit easier...
This commit is contained in:
Eryn Wells 2014-07-20 12:37:31 -07:00
parent c564791d1a
commit c65c6a3cfd
3 changed files with 16 additions and 8 deletions

View file

@ -36,8 +36,9 @@ public:
int get_height() const;
void set_height(int h) { height = h; }
Camera* GetCamera() const;
Camera::Ptr GetCamera() const;
void SetCamera(Camera* camera);
void SetCamera(Camera::Ptr camera);
AmbientLight &get_ambient() const;
const Color *get_pixels() const;
@ -55,7 +56,7 @@ private:
// Pixel dimensions of the image.
int width, height;
Camera *mCamera;
Camera::Ptr mCamera;
/*
* Ray tracing parameters. max_depth indicates the maximum depth of the ray tree. min_weight indicates the minimum