Blue Project
Kyle,Nigel,Jamie
 All Classes Files Functions Variables Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RayTracer Class Reference

#include <RayTracer.h>

Inheritance diagram for RayTracer:

Classes

class  Settings
 
class  Stats
 

Public Member Functions

shared_ptr< Image > render (const Settings &settings, const Array< shared_ptr< Surface > > &surfaceArray, const shared_ptr< LightingEnvironment > &lighting, const shared_ptr< Camera > &camera, Stats &stats)
 Render the specified image. More...
 

Static Public Member Functions

static shared_ptr< RayTracercreate ()
 

Protected Member Functions

shared_ptr< Surfel > castRay (const Ray &ray, float maxDistance=finf(), bool anyHit=false) const
 
Radiance3 L_scatteredDirect (const shared_ptr< Surfel > &surfel, const Vector3 &wo, Random &rnd) const
 
 RayTracer ()
 
void traceAllPixels (int numThreads)
 Called from render(). More...
 
void traceOnePixel (int x, int y, int threadID)
 Called from GThread::runConcurrently2D(), which is invoked in traceAllPixels() More...
 

Protected Attributes

shared_ptr< Camera > m_camera
 
shared_ptr< Image > m_image
 
shared_ptr< LightingEnvironment > m_lighting
 
Array< shared_ptr< Random > > m_rnd
 Array of random number generators so that each threadID may have its own without using locks. More...
 
Settings m_settings
 
TriTree m_triTree
 

Constructor & Destructor Documentation

RayTracer::RayTracer ( )
protected

Member Function Documentation

shared_ptr< Surfel > RayTracer::castRay ( const Ray &  ray,
float  maxDistance = finf(),
bool  anyHit = false 
) const
protected
Parameters
rayin world space
maxDistanceDon’t trace farther than this
anyHitIf true, return any surface hit, even if it is not the first
Returns
The surfel hit, or NULL if none was hit
shared_ptr< RayTracer > RayTracer::create ( )
static
Radiance3 RayTracer::L_scatteredDirect ( const shared_ptr< Surfel > &  surfel,
const Vector3 &  wo,
Random &  rnd 
) const
protected
shared_ptr< Image > RayTracer::render ( const Settings settings,
const Array< shared_ptr< Surface > > &  surfaceArray,
const shared_ptr< LightingEnvironment > &  lighting,
const shared_ptr< Camera > &  camera,
Stats stats 
)

Render the specified image.

void RayTracer::traceAllPixels ( int  numThreads)
protected

Called from render().

Writes to m_image.

void RayTracer::traceOnePixel ( int  x,
int  y,
int  threadID 
)
protected

Called from GThread::runConcurrently2D(), which is invoked in traceAllPixels()

Member Data Documentation

shared_ptr<Camera> RayTracer::m_camera
protected
shared_ptr<Image> RayTracer::m_image
protected
shared_ptr<LightingEnvironment> RayTracer::m_lighting
protected
Array< shared_ptr<Random> > RayTracer::m_rnd
protected

Array of random number generators so that each threadID may have its own without using locks.

Settings RayTracer::m_settings
protected
TriTree RayTracer::m_triTree
protected

The documentation for this class was generated from the following files: