//---------------------------------------------------------------------------- // William Baxter III's Ray Tracer // // Project for Comp 238, Raster Graphics // University of North Carolina at Chapel Hill // // $Id:$ //---------------------------------------------------------------------------- #ifndef WB3SAMPLING_H #define WB3SAMPLING_H #include //---------------------------------------------------------------------------- namespace wb3Sampling { // Construct an orthonormal basis out of L by finding // two vectors U and V that are mutually orthogonal. void ComputePerpendiculars(const Vec3f& N, Vec3f& U, Vec3f& V); // Perturb pos in the plane defined by either a normal N // or orthonormal U and V vectors. Perturb by a maximum of radius // units. void PerturbSampleRadially(Vec3f &pos, const Vec3f& N, float radius); void PerturbSampleRadially(Vec3f &pos, const Vec3f& U, const Vec3f &V, float radius); } #endif