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 Glass : public Material {
00032 public:
00033
00034 Glass(boost::shared_ptr<Texture<SWCSpectrum> > r, boost::shared_ptr<Texture<SWCSpectrum> > t,
00035 boost::shared_ptr<Texture<float> > i, boost::shared_ptr<Texture<float> > cbf,
00036 boost::shared_ptr<Texture<float> > flm, boost::shared_ptr<Texture<float> > flmindex,
00037 bool archi, boost::shared_ptr<Texture<float> > bump, const CompositingParams &cp) {
00038 Kr = r;
00039 Kt = t;
00040 index = i;
00041 cauchyb = cbf;
00042 film = flm;
00043 filmindex = flmindex;
00044 architectural = archi;
00045 bumpMap = bump;
00046 compParams = new CompositingParams(cp);
00047 }
00048 virtual ~Glass() { }
00049 virtual BSDF *GetBSDF(const TsPack *tspack, const DifferentialGeometry &dgGeom, const DifferentialGeometry &dgShading) const;
00050
00051 static Material * CreateMaterial(const Transform &xform, const TextureParams &mp);
00052 private:
00053
00054 boost::shared_ptr<Texture<SWCSpectrum> > Kr, Kt;
00055 boost::shared_ptr<Texture<float> > index;
00056 boost::shared_ptr<Texture<float> > cauchyb;
00057 boost::shared_ptr<Texture<float> > film, filmindex;
00058 boost::shared_ptr<Texture<float> > bumpMap;
00059 bool architectural;
00060 };
00061
00062 }
00063