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<SWCSpectrum> > r, boost::shared_ptr<Texture<SWCSpectrum> > 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 const CompositingParams &cp) {
00038 Kr = r;
00039 Kt = t;
00040 uroughness = urough;
00041 vroughness = vrough;
00042 index = i;
00043 cauchyb = cbf;
00044 bumpMap = bump;
00045 compParams = new CompositingParams(cp);
00046 }
00047 virtual ~RoughGlass() { }
00048 virtual BSDF *GetBSDF(const TsPack *tspack, const DifferentialGeometry &dgGeom, const DifferentialGeometry &dgShading) const;
00049
00050 static Material * CreateMaterial(const Transform &xform, const TextureParams &mp);
00051 private:
00052
00053 boost::shared_ptr<Texture<SWCSpectrum> > Kr, Kt;
00054 boost::shared_ptr<Texture<float> > index;
00055 boost::shared_ptr<Texture<float> > cauchyb;
00056 boost::shared_ptr<Texture<float> > uroughness;
00057 boost::shared_ptr<Texture<float> > vroughness;
00058 boost::shared_ptr<Texture<float> > bumpMap;
00059 };
00060
00061 }
00062