00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "lux.h"
00025 #include "material.h"
00026
00027 namespace lux
00028 {
00029
00030
00031 class RoughGlass : public Material {
00032 public:
00033
00034 RoughGlass(boost::shared_ptr<Texture<Spectrum> > r, boost::shared_ptr<Texture<Spectrum> > t,
00035 boost::shared_ptr<Texture<float> > urough, boost::shared_ptr<Texture<float> > vrough,
00036 boost::shared_ptr<Texture<float> > i, boost::shared_ptr<Texture<float> > cbf, boost::shared_ptr<Texture<float> > bump) {
00037 Kr = r;
00038 Kt = t;
00039 uroughness = urough;
00040 vroughness = vrough;
00041 index = i;
00042 cauchyb = cbf;
00043 bumpMap = bump;
00044 }
00045 BSDF *GetBSDF(const DifferentialGeometry &dgGeom, const DifferentialGeometry &dgShading, float u) const;
00046
00047 static Material * CreateMaterial(const Transform &xform, const TextureParams &mp);
00048 private:
00049
00050 boost::shared_ptr<Texture<Spectrum> > Kr, Kt;
00051 boost::shared_ptr<Texture<float> > index;
00052 boost::shared_ptr<Texture<float> > cauchyb;
00053 boost::shared_ptr<Texture<float> > uroughness;
00054 boost::shared_ptr<Texture<float> > vroughness;
00055 boost::shared_ptr<Texture<float> > bumpMap;
00056 };
00057
00058 }
00059