[Toxicengine-cvs] toxic/src/renderer causticsphotontracer.cpp,1.7,1.8 causticsphotontracer.h,1.6,1.7
Status: Alpha
Brought to you by:
jperret
From: Jonathan P. <jp...@us...> - 2004-11-09 22:39:55
|
Update of /cvsroot/toxicengine/toxic/src/renderer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27055/src/renderer Modified Files: causticsphotontracer.cpp causticsphotontracer.h globalphotontracer.cpp globalphotontracer.h icamera.cpp icamera.h iphotontracer.cpp iphotontracer.h photonmap.cpp photonmap.h ray.inl scene.cpp scene.h thinlenscamera.cpp Log Message: dictoon's remaining changes : - ProgressMonitor renamed to IProgressMonitor - BinaryStream rewritten Index: scene.cpp =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/scene.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** scene.cpp 6 May 2004 16:21:24 -0000 1.3 --- scene.cpp 9 Nov 2004 22:39:44 -0000 1.4 *************** *** 23,26 **** --- 23,28 ---- #include "scene.h" // include first + using namespace sheep; + using namespace std; using namespace toxic; *************** *** 49,50 **** --- 51,64 ---- m_lights.push_back(light); } + + void Scene::GetObjectsContainingPoint(const Point3 &point, //!< World space. + vector<const IObject *> *objects) const + { + assert(m_root_object); + assert(objects); + + assert(!"Not implemented yet."); + /* + if(m_root_object->Contains(point)) + m_root_object->GetObjectsContainingPoint(point, objects);*/ + } Index: globalphotontracer.h =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/globalphotontracer.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** globalphotontracer.h 5 Jun 2004 13:28:35 -0000 1.6 --- globalphotontracer.h 9 Nov 2004 22:39:44 -0000 1.7 *************** *** 26,30 **** #include "globals.h" // include first - #include "common/misc/progressmonitor.h" #include "iphotontracer.h" --- 26,29 ---- Index: causticsphotontracer.h =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/causticsphotontracer.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** causticsphotontracer.h 5 Jun 2004 13:28:35 -0000 1.6 --- causticsphotontracer.h 9 Nov 2004 22:39:44 -0000 1.7 *************** *** 26,30 **** #include "globals.h" // include first - #include "common/misc/progressmonitor.h" #include "iphotontracer.h" --- 26,29 ---- Index: thinlenscamera.cpp =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/thinlenscamera.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** thinlenscamera.cpp 18 May 2004 00:42:24 -0000 1.3 --- thinlenscamera.cpp 9 Nov 2004 22:39:44 -0000 1.4 *************** *** 89,98 **** ray.m_direction.Normalize(); ! // Cast a ray through the scene to compute focal distance. If the ray ! // don't hit any object, throw an exception. Hit hit; ! if(scene->Trace(context, ray, &hit)) m_focal_distance = hit.m_abscissa; ! else { assert(!"Could not compute focal distance."); throw "Could not compute focal distance."; --- 89,98 ---- ray.m_direction.Normalize(); ! // Cast a ray through the scene to compute focal distance. Hit hit; ! if(scene->Trace(context, ray, &hit)) { m_focal_distance = hit.m_abscissa; ! } else { ! //!\todo Handle this case gracefully. assert(!"Could not compute focal distance."); throw "Could not compute focal distance."; Index: causticsphotontracer.cpp =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/causticsphotontracer.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** causticsphotontracer.cpp 5 Jun 2004 12:06:36 -0000 1.7 --- causticsphotontracer.cpp 9 Nov 2004 22:39:44 -0000 1.8 *************** *** 106,110 **** &scattereddir, &prob, ! &bsdf_value); const Vector3 world_scattereddir = surfacebasis.TransformToWorld(scattereddir); --- 106,111 ---- &scattereddir, &prob, ! &bsdf_value ! ); const Vector3 world_scattereddir = surfacebasis.TransformToWorld(scattereddir); Index: scene.h =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/scene.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** scene.h 5 Jun 2004 13:28:35 -0000 1.7 --- scene.h 9 Nov 2004 22:39:44 -0000 1.8 *************** *** 58,62 **** //! Ambient illumination. Default is none. ! //!\todo Move ambient illumination to a class derived from ILight. void SetAmbientIllumination(const Color3 &ambient); const Color3 &GetAmbientIllumination() const; --- 58,62 ---- //! Ambient illumination. Default is none. ! //!\todo Move ambient illumination to its own class derived from ILight. void SetAmbientIllumination(const Color3 &ambient); const Color3 &GetAmbientIllumination() const; *************** *** 77,80 **** --- 77,85 ---- ) const; + void GetObjectsContainingPoint( + const sheep::Point3 &point, //!< World space. + std::vector<const IObject *> *objects + ) const; + private: Color3 m_background_color; Index: iphotontracer.cpp =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/iphotontracer.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** iphotontracer.cpp 18 May 2004 00:42:24 -0000 1.5 --- iphotontracer.cpp 9 Nov 2004 22:39:44 -0000 1.6 *************** *** 36,40 **** const Scene *scene, int photon_count, ! ProgressMonitor *progmon /*= 0*/) const { assert(photonmap); --- 36,40 ---- const Scene *scene, int photon_count, ! IProgressMonitor *progmon /*= 0*/) const { assert(photonmap); *************** *** 80,84 **** const ILight *light, int photon_count, ! ProgressMonitor *progmon /*= 0*/) const { assert(photonmap); --- 80,84 ---- const ILight *light, int photon_count, ! IProgressMonitor *progmon /*= 0*/) const { assert(photonmap); Index: photonmap.h =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/photonmap.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** photonmap.h 5 Jun 2004 13:28:35 -0000 1.6 --- photonmap.h 9 Nov 2004 22:39:44 -0000 1.7 *************** *** 29,33 **** #include "common/math/real.h" #include "common/math/vector3.h" ! #include "common/misc/progressmonitor.h" #include "common/misc/threadutils.h" #include "common/misc/types.h" --- 29,33 ---- #include "common/math/real.h" #include "common/math/vector3.h" ! #include "common/misc/iprogressmonitor.h" #include "common/misc/threadutils.h" #include "common/misc/types.h" *************** *** 124,128 **** sheep::Real max_dist, int max_photons, ! sheep::ProgressMonitor *progmon = 0 ); --- 124,128 ---- sheep::Real max_dist, int max_photons, ! sheep::IProgressMonitor *progmon = 0 ); *************** *** 154,158 **** bool WriteToFile( const std::string &filename, ! sheep::ProgressMonitor *progmon = 0 ) const; --- 154,158 ---- bool WriteToFile( const std::string &filename, ! sheep::IProgressMonitor *progmon = 0 ) const; *************** *** 162,166 **** Context *context, const std::string &filename, ! sheep::ProgressMonitor *progmon = 0 ); --- 162,166 ---- Context *context, const std::string &filename, ! sheep::IProgressMonitor *progmon = 0 ); Index: photonmap.cpp =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/photonmap.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** photonmap.cpp 5 Jun 2004 12:06:36 -0000 1.9 --- photonmap.cpp 9 Nov 2004 22:39:44 -0000 1.10 *************** *** 324,328 **** Real max_dist, int max_photons, ! ProgressMonitor *progmon /*= 0*/) { assert(spacing >= 1); --- 324,328 ---- Real max_dist, int max_photons, ! IProgressMonitor *progmon /*= 0*/) { assert(spacing >= 1); *************** *** 479,489 **** bool PhotonMap::WriteToFile(const string &filename, ! ProgressMonitor *progmon /*= 0*/) const { try { BinaryStream os( filename.c_str(), BinaryStream::OutputStream, ! BinaryStream::BigEndian // by convention, photon map files are written using big endian convention ); --- 479,490 ---- bool PhotonMap::WriteToFile(const string &filename, ! IProgressMonitor *progmon /*= 0*/) const { try { + // By convention, photon map files are written using big endian. BinaryStream os( filename.c_str(), BinaryStream::OutputStream, ! BinaryStream::BigEndian ); *************** *** 536,540 **** PhotonMap *PhotonMap::CreateFromFile(Context *context, const string &filename, ! ProgressMonitor *progmon /*= 0*/) { assert(context); --- 537,541 ---- PhotonMap *PhotonMap::CreateFromFile(Context *context, const string &filename, ! IProgressMonitor *progmon /*= 0*/) { assert(context); *************** *** 543,550 **** try { BinaryStream is( filename.c_str(), BinaryStream::InputStream, ! BinaryStream::BigEndian // by convention, photon map files are written using big endian convention ); --- 544,552 ---- try { + // By convention, photon map files are written using big endian. BinaryStream is( filename.c_str(), BinaryStream::InputStream, ! BinaryStream::BigEndian ); Index: icamera.cpp =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/icamera.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** icamera.cpp 6 May 2004 16:21:24 -0000 1.2 --- icamera.cpp 9 Nov 2004 22:39:44 -0000 1.3 *************** *** 45,46 **** --- 45,50 ---- m_w = m_ez * (-m_focal_length); } + + void ICamera::Finalize(Context *context, const Scene *scene) { + + } Index: icamera.h =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/icamera.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** icamera.h 5 Jun 2004 13:28:35 -0000 1.4 --- icamera.h 9 Nov 2004 22:39:44 -0000 1.5 *************** *** 63,67 **** Context *context, const Scene *scene ! ) {} //! Returns a ray whose origin is at camera location, and which --- 63,67 ---- Context *context, const Scene *scene ! ); //! Returns a ray whose origin is at camera location, and which *************** *** 80,83 **** --- 80,84 ---- protected: + //! Camera geometry. sheep::Point3 m_location; //!< Location of the camera, expressed in world space. sheep::Vector3 m_ex, m_ey, m_ez; //!< Basis vectors, expressed in world space. m_ex is scaled by the aspect ratio. Index: ray.inl =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/ray.inl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ray.inl 6 Jun 2004 12:22:47 -0000 1.5 --- ray.inl 9 Nov 2004 22:39:44 -0000 1.6 *************** *** 44,48 **** m_id(m_next_id++), m_origin(r.m_origin), ! m_direction(r.m_direction) { assert(m_id >= 0); --- 44,49 ---- m_id(m_next_id++), m_origin(r.m_origin), ! m_direction(r.m_direction), ! m_ior_stack(r.m_ior_stack) { assert(m_id >= 0); Index: globalphotontracer.cpp =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/globalphotontracer.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** globalphotontracer.cpp 5 Jun 2004 12:06:36 -0000 1.7 --- globalphotontracer.cpp 9 Nov 2004 22:39:44 -0000 1.8 *************** *** 113,117 **** &scattereddir, &prob, ! &bsdf_value); const Vector3 world_scattereddir = surfacebasis.TransformToWorld(scattereddir); --- 113,118 ---- &scattereddir, &prob, ! &bsdf_value ! ); const Vector3 world_scattereddir = surfacebasis.TransformToWorld(scattereddir); Index: iphotontracer.h =================================================================== RCS file: /cvsroot/toxicengine/toxic/src/renderer/iphotontracer.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** iphotontracer.h 5 Jun 2004 13:28:35 -0000 1.7 --- iphotontracer.h 9 Nov 2004 22:39:44 -0000 1.8 *************** *** 26,30 **** #include "globals.h" // include first ! #include "common/misc/progressmonitor.h" namespace toxic { --- 26,30 ---- #include "globals.h" // include first ! #include "common/misc/iprogressmonitor.h" namespace toxic { *************** *** 48,52 **** const Scene *scene, int photon_count, ! sheep::ProgressMonitor *progmon = 0 ) const; --- 48,52 ---- const Scene *scene, int photon_count, ! sheep::IProgressMonitor *progmon = 0 ) const; *************** *** 58,62 **** const ILight *light, int photon_count, ! sheep::ProgressMonitor *progmon ) const; --- 58,62 ---- const ILight *light, int photon_count, ! sheep::IProgressMonitor *progmon ) const; |