From 3c3e707922fd4db3ce907dead2595d994d246d8a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 9 Aug 2014 20:23:08 -0700 Subject: [PATCH] Light has a shared_ptr type, and an overridable Contribution() --- src/light.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/light.hh b/src/light.hh index 241ef33..22d0f2f 100644 --- a/src/light.hh +++ b/src/light.hh @@ -6,6 +6,8 @@ #ifndef __LIGHT_H__ #define __LIGHT_H__ +#include + #include "basics/basics.hh" @@ -13,6 +15,8 @@ namespace charles { struct Light { + typedef std::shared_ptr Ptr; + Light(const basics::Color& color, const Double& intensity = 1.0); @@ -23,7 +27,7 @@ struct Light Double GetIntensity() const; void SetIntensity(const Double& intensity); - basics::Color&& Contribution() const; + virtual basics::Color&& Contribution() const; private: Double ClampIntensity(const Double& intensity);