SurfacePoint.cpp File Reference

Core class representing a single point on the surface of a Shape, which was likely generated by either an intersection with a Ray or random sampling on the surface of the shape. SurfacePoint encapsulates all of the different information about a surface point and is used for shading evaluation (BSDF), emittance evaluation (Emitter), and so-called importance evaluation (Sensor). More...

#include "SurfacePoint.h"
#include <Material.h>
#include <Ray.h>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const SurfacePoint &pt)
 Prints a SurfacePoint to an output stream for debugging purposes.


Detailed Description

Core class representing a single point on the surface of a Shape, which was likely generated by either an intersection with a Ray or random sampling on the surface of the shape. SurfacePoint encapsulates all of the different information about a surface point and is used for shading evaluation (BSDF), emittance evaluation (Emitter), and so-called importance evaluation (Sensor).

Author:
Travis Fischer (fisch0920@gmail.com)
Date:
Fall 2008
Milton supports the useful distinction between geometric and shading normals defined at a point, where the geometric normal (SurfacePoint::normalG) is the actual normal of the underlying surface at a point, and the shading normal (SurfacePoint::normalS) is a (possibly) perturbed version of the geometric normal. Shading normals attempt to simulate more complex underlying geometry by varying the apparent normal across the surface of a simpler surface such as a plane. It is important to note that shading normals have no physical basic whatsoever -- they are merely a useful (and very common) method for faking higher resolution (ie. more expensive) geometry. See the bump mapping implementation in Material for an example use of shading normals.

Note:
When finding the closest intersection point between a Ray and a set of objects in the scene, SurfacePoint is used to hold the 'current' closest object and any metadata that shape may need to lazily fill in the rest of the SurfacePoint structure later on (see Shape::initSurfacePoint).

Definition in file SurfacePoint.cpp.


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SurfacePoint pt 
)

Prints a SurfacePoint to an output stream for debugging purposes.

Definition at line 78 of file SurfacePoint.cpp.


Generated on 28 Feb 2009 for Milton by doxygen 1.5.6