00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if defined(_MSC_VER)
00025 #pragma once
00026 #endif
00027
00028 #ifndef PBRT_MATERIALS_PLASTIC_H
00029 #define PBRT_MATERIALS_PLASTIC_H
00030
00031
00032 #include "pbrt.h"
00033 #include "material.h"
00034
00035
00036 class PlasticMaterial : public Material {
00037 public:
00038
00039 PlasticMaterial(Reference<Texture<Spectrum> > kd,
00040 Reference<Texture<Spectrum> > ks,
00041 Reference<Texture<float> > rough,
00042 Reference<Texture<float> > bump)
00043 : Kd(kd), Ks(ks), roughness(rough), bumpMap(bump) {
00044 }
00045 BSDF *GetBSDF(const DifferentialGeometry &dgGeom,
00046 const DifferentialGeometry &dgShading,
00047 MemoryArena &arena) const;
00048 private:
00049
00050 Reference<Texture<Spectrum> > Kd, Ks;
00051 Reference<Texture<float> > roughness, bumpMap;
00052 };
00053
00054
00055 PlasticMaterial *CreatePlasticMaterial(const Transform &xform,
00056 const TextureParams &mp);
00057
00058 #endif // PBRT_MATERIALS_PLASTIC_H