Account all types of rays -- print them at the end

This commit is contained in:
Eryn Wells 2014-07-20 14:21:12 -07:00
parent c65c6a3cfd
commit 0d2011931c
2 changed files with 69 additions and 13 deletions

View file

@ -38,7 +38,6 @@ public:
Camera::Ptr GetCamera() const;
void SetCamera(Camera* camera);
void SetCamera(Camera::Ptr camera);
AmbientLight &get_ambient() const;
const Color *get_pixels() const;
@ -71,7 +70,21 @@ private:
std::list<PointLight *> lights;
// Rendering stats
unsigned int nrays;
struct Stats
{
unsigned long TotalRays() const;
void PrintRayTable() const;
unsigned long primaryRays;
unsigned long shadowRays;
unsigned long reflectionRays;
unsigned long transmissionRays;
private:
void PrintRayRow(const std::string& title,
const unsigned long& value) const;
} mStats;
// Rendering output.
bool _is_rendered;