Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

statistics.h

Go to the documentation of this file.
00001 /*
00002     toxic - A Global Illumination Renderer
00003     Copyright (C) 2003-2004 Francois Beaune
00004     Contact: http://toxicengine.sourceforge.net/
00005 
00006     This file is part of toxic.
00007 
00008     toxic is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     toxic is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with toxic; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 */
00022 
00023 #ifndef TOXIC_RENDERER_STATISTICS_H
00024 #define TOXIC_RENDERER_STATISTICS_H
00025 
00026 #include "common/misc/types.h"
00027 #include "globals.h"
00028 
00029 namespace toxic {
00030 
00031     class Statistics {
00032     public:
00033         //! Pixels.
00034         sheep::int64 m_total_pixels;                    //!< Total number of pixels rendered.
00035 
00036         //! Photons.
00037         //!\todo These numbers are useless: photon maps already know how many photons they hold.
00038         sheep::int64 m_gpm_photons;                     //!< Total number of photons in the global photon map.
00039         sheep::int64 m_cpm_photons;                     //!< Total number of photons in the caustics photon map.
00040 
00041         //! Rays.
00042         sheep::int64 m_primary_rays;                    //!< Total number of primary rays (rays traced from the camera).
00043         sheep::int64 m_secondary_rays;                  //!< Total number of secondary rays (rays traced for specular reflections).
00044         sheep::int64 m_shadow_rays;                     //!< Total number of shadow rays.
00045         sheep::int64 m_photon_rays;                     //!< Total number of rays traced to transport photons (caustics and global).
00046         sheep::int64 m_primary_final_gathering_rays;    //!< Total number of rays traced for primary final gathering.
00047         sheep::int64 m_secondary_final_gathering_rays;  //!< Total number of rays traced for secondary final gathering.
00048 
00049         //! Intersections.
00050         sheep::int64 m_tested_intersections;            //!< Total number of intersection tests (with primitives only).
00051         sheep::int64 m_intersections_found;             //!< Number of successful intersection tests (with primitives only).
00052 
00053         Statistics();
00054 
00055         //! Resets all counters.
00056         void Reset();
00057 
00058         //! Computes and returns the total number of rays cast during rendering phase
00059         //! (thus excluding photon rays).
00060         sheep::int64 ComputeTotalRays() const;
00061     };
00062 
00063 #include "statistics.inl"
00064 
00065 }
00066 
00067 #endif  // !TOXIC_RENDERER_STATISTICS_H

Generated on Tue May 11 01:31:52 2004 for toxic by doxygen 1.3.6