10 #include "core/core.hpp"
11 #include "core/common.h"
12 #include "core/uncopyable.h"
13 #include "core/spectrum.h"
15 #include "core/render.hpp"
16 #include "core/fresnel.h"
20 enum class BxDFType : int {
27 All = Reflection | Transmission | Diffuse | Glossy | Specular,
30 inline BxDFType operator|(BxDFType t1, BxDFType t2) {
31 return static_cast<BxDFType
>(
static_cast<int>(t1) | static_cast<int>(t2));
34 inline BxDFType operator&(BxDFType t1, BxDFType t2) {
35 return static_cast<BxDFType
>(
static_cast<int>(t1) & static_cast<int>(t2));
38 inline BxDFType operator~(BxDFType t) {
39 return static_cast<BxDFType
>(~static_cast<
int>(t));
48 explicit BxDF(BxDFType type = BxDFType::None);
53 const Point2d& rands,
double* pdf,
54 BxDFType* sampledType =
nullptr)
const;
57 inline BxDFType type()
const {
return type_; }
100 double* pdf, BxDFType* sampledType)
const override;
119 double* pdf, BxDFType* sampledType)
const override;
126 std::unique_ptr<FresnelDielectric> fresnel_;
141 double* pdf, BxDFType* sampledType)
const override;
161 double* pdf, BxDFType* sampledType)
const override;
182 double* pdf, BxDFType* sampledType)
const override;
191 const double etaA_, etaB_;
196 #endif // _SPICA_BXDF_H_
The base class for microfacet distributions.
Definition: microfacet.h:16
Microfacet transmission.
Definition: bxdf.h:173
Lambertian refrection.
Definition: bxdf.h:67
RGB spectrum.
Definition: spectrum.h:18
Lambertian transmission.
Definition: bxdf.h:80
Specular transmission.
Definition: bxdf.h:112
Fresnel specular refraction (Glass-like effect).
Definition: bxdf.h:133
Specular reflection (Metal-like effect).
Definition: bxdf.h:93
The inteface for Fresnel reflections.
Definition: fresnel.h:16
Interface class which forbids copy and assignment.
Definition: uncopyable.h:15
Microfacet reflaction.
Definition: bxdf.h:155
The base class of BxDFs.
Definition: bxdf.h:45