SurfacePoint Class 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>

Inheritance diagram for SurfacePoint:

SSEAligned

List of all members.

Public Member Functions

Constructors
 SurfacePoint ()
 SurfacePoint (Shape *shape_, const Point3 &p0, const Point3 &p1)
 ~SurfacePoint ()
Initialization
bool init (const Ray &ray, real_t t)
 Initializes this point, assuming shape has already been filled in, in addition to any optional shape or material-specific utility data (index, normalCase).
void init ()
 Initializes this point, assuming shape/position have already been filled in, in addition to any optional shape or material-specific utility data (UV, index, normalCase).

Public Attributes

Surface data lazily filled in by Shape::initSurfacePoint
Shapeshape
 intersected shape
Point3 position
 world-space position
Vector3 normalG
 geometric normal
Vector3 normalS
UV uv
 UV coordinates.
Material data evaluated lazily by Material::initSurfacePoint
BSDFbsdf
 reflectance
Emitteremitter
 emittance
Sensorsensor
 importance aka sensor response (for cameras)
real_t ior1
 incident index of refraction
real_t ior2
 exitent index of refraction
Shape-specific, lazy-helper data
unsigned index
unsigned normalCase
Utility normal accessor
struct
SurfacePoint::SurfacePointNormal 
normal
 Convenience stand-in normal which plays nicely with shapes that don't support the concept of a normal (ex. point lights).

Classes

struct  SurfacePointNormal
 Convenience stand-in normal which plays nicely with shapes that don't support the concept of a normal (ex. point lights). More...


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 at line 48 of file SurfacePoint.h.


Constructor & Destructor Documentation

SurfacePoint::SurfacePoint (  )  [inline]

Definition at line 101 of file SurfacePoint.h.

SurfacePoint::SurfacePoint ( Shape shape_,
const Point3 p0,
const Point3 p1 
) [inline]

Definition at line 107 of file SurfacePoint.h.

SurfacePoint::~SurfacePoint (  ) 

Definition at line 37 of file SurfacePoint.cpp.


Member Function Documentation

bool SurfacePoint::init ( const Ray ray,
real_t  t 
)

Initializes this point, assuming shape has already been filled in, in addition to any optional shape or material-specific utility data (index, normalCase).

Returns:
false if this point is invalid and can't be initialized (in the case of an invalid t-value)

Definition at line 47 of file SurfacePoint.cpp.

void SurfacePoint::init (  ) 

Initializes this point, assuming shape/position have already been filled in, in addition to any optional shape or material-specific utility data (UV, index, normalCase).

Definition at line 65 of file SurfacePoint.cpp.


Member Data Documentation

intersected shape

Definition at line 53 of file SurfacePoint.h.

world-space position

Definition at line 56 of file SurfacePoint.h.

geometric normal

Definition at line 59 of file SurfacePoint.h.

shading normal (possibly a perturbed version of the geometric normal, normalG)

Definition at line 63 of file SurfacePoint.h.

UV coordinates.

Definition at line 66 of file SurfacePoint.h.

reflectance

Definition at line 74 of file SurfacePoint.h.

emittance

Definition at line 77 of file SurfacePoint.h.

importance aka sensor response (for cameras)

Definition at line 80 of file SurfacePoint.h.

incident index of refraction

Definition at line 83 of file SurfacePoint.h.

exitent index of refraction

Definition at line 86 of file SurfacePoint.h.

Definition at line 93 of file SurfacePoint.h.

Definition at line 94 of file SurfacePoint.h.

Convenience stand-in normal which plays nicely with shapes that don't support the concept of a normal (ex. point lights).


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

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6