From 589b1f23ec54250f33cb13ab2b24b6d41d935756 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 3 Aug 2014 20:12:40 -0700 Subject: [PATCH] Camera GetTypeString and WriteType declarations --- src/camera.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/camera.h b/src/camera.h index 5efbd9e..f3b46d1 100644 --- a/src/camera.h +++ b/src/camera.h @@ -52,7 +52,13 @@ struct Camera virtual Ray compute_primary_ray(const int x, const int width, const int y, const int height) const = 0; + virtual std::string GetTypeString() const; + private: + friend std::ostream& operator<<(std::ostream& ost, const Camera& camera); + + void WriteType(std::ostream& ost) const; + /** * The location of the camera in the scene. Depending on the type of camera, * this is the point from which rays will be emitted. @@ -73,10 +79,6 @@ private: * this and mRight determine the aspect ratio of the image. */ Vector3 mUp; - - virtual void WriteType(std::ostream& ost) const; - - friend std::ostream& operator<<(std::ostream& ost, const Camera& camera); }; @@ -91,7 +93,7 @@ public: const int y, const int height) const; private: - void WriteType(std::ostream& ost) const; + std::string GetTypeString() const; }; @@ -106,7 +108,7 @@ public: const int y, const int height) const; private: - void WriteType(std::ostream& ost) const; + std::string GetTypeString() const; };