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

Surface Class Reference

The virtual base class for all objects that can be intersected with a ray. More...

#include <core/Surface.h>

Inheritance diagram for Surface:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual bool hit (Ray &r, HitRecord &rec, Context &context) const =0
virtual bool shadowHit (Ray &r, Context &context) const
virtual bool randomPoint (Vector3 &on_light, Context &context) const
virtual bool randomDirection (const HitRecord &rec, Context &context, Vector3 &w_in, double &pdf) const
virtual double pdfDirection (const Vector3 &w_in, const HitRecord &rec, Context &context) const
virtual int triangulate (int lod, MeshTriangle *tris, const Context &context)
virtual BBox boundingBox (double time0, double time1) const =0
virtual bool overlapsBox (const BBox &box) const =0

Detailed Description

The virtual base class for all objects that can be intersected with a ray.


Member Function Documentation

virtual bool Surface::hit Ray r,
HitRecord rec,
Context context
const [pure virtual]
 

Intersect given ray with the surface.

Parameters:
[in,out] r Ray to be intersected.
[in,out] rec Struct for passed back shading geometry.
[in,out] context Rendering context.
Returns:
Returns true if a new closest intersection has been found.

Implemented in BVH, HG, SurfaceList, UG, ConstantMedium, Instance, MeshTriangle, Parallelogram, RayleighMedium, Sphere, and Triangle.

virtual bool Surface::shadowHit Ray r,
Context context
const [inline, virtual]
 

Intersect without visibility ordering or shading geometry.

Parameters:
[in,out] r Ray to be intersected.
[in,out] context Rendering context.
Returns:
Returns true if a valid intersection is found.

Reimplemented in BVH, HG, SurfaceList, UG, ConstantMedium, MeshTriangle, Parallelogram, RayleighMedium, Sphere, and Triangle.

virtual bool Surface::randomPoint Vector3 on_light,
Context context
const [inline, virtual]
 

Randomly sample a point on the surface.

Parameters:
[out] on_light The generated sample point.
[in] context Contains seeds for sampling.
Returns:
True if the sample was generated.

Reimplemented in Parallelogram, and Sphere.

virtual bool Surface::randomDirection const HitRecord rec,
Context context,
Vector3 w_in,
double &  pdf
const [inline, virtual]
 

Randomly sample the solid angle subtended by the surface from rec.p.

Parameters:
[in] rec The record of the point being shaded.
[in] context Contains seeds for sampling.
[out] w_in The generated sample direction.
[out] pdf The pdf of the sampled direction.
Returns:
Returns true if a direction was generated.

Reimplemented in Parallelogram, and Sphere.

virtual double Surface::pdfDirection const Vector3 w_in,
const HitRecord rec,
Context context
const [inline, virtual]
 

Evalute pdf for the given direction.

Parameters:
[in] w_in The direction from hit point to the surface sampled.
[in] rec The record of the hit point being shaded.
[in] context The rendering context.
Returns:
Evaluation of the pdf for the given direction.

Reimplemented in Parallelogram, Sphere, and Triangle.

virtual BBox Surface::boundingBox double  time0,
double  time1
const [pure virtual]
 

Calculate the bounding box of the surface.

Parameters:
[in] time0 Minimum of time interval being sampled.
[in] time1 Maximum of time interval being sampled.
Returns:
The bounding box of the object in the interval [time0, time1).

Implemented in BVH, HG, SurfaceList, UG, ConstantMedium, Instance, MeshTriangle, Parallelogram, RayleighMedium, Sphere, and Triangle.

virtual bool Surface::overlapsBox const BBox box  )  const [pure virtual]
 

Determine if this surface overlaps the input axis aligned box.

Parameters:
[in] box Bounding box to test against.
Returns:
False if the surface definitely does not overlap the box.

Implemented in BVH, HG, SurfaceList, UG, ConstantMedium, Instance, MeshTriangle, Parallelogram, RayleighMedium, Sphere, and Triangle.


The documentation for this class was generated from the following file:
Generated on Wed Jul 20 16:15:28 2005 for galileo by  doxygen 1.4.3