Loading...
Searching...
No Matches
bsdfsample.h
Go to the documentation of this file.
1#ifndef _BBM_BSDFSAMPLE_H_
2#define _BBM_BSDFSAMPLE_H_
3
4#include <ostream>
5
6#include "util/reflection.h"
7#include "bbm/config.h"
8
9/******************************************************************************/
10/*! \file bsdfsample.h
11 \brief Structure to hold a sampled direction and corresponding pdf.
12*******************************************************************************/
13
14namespace bbm {
15
16 /*********************************************************************/
17 /*! \brief Structure to hold a sample's direction and PDF
18 *********************************************************************/
19 template<typename CONF> requires concepts::config<CONF>
21 {
23
24 Vec3d direction; ///< Sampled direction
25 Value pdf; ///< Pdf of the sampled direction
26 BsdfFlag flag; ///< Type of sample
27
29 };
30
31 /////////////////////
32 // ostream support //
33 /////////////////////
34 template<typename CONF>
35 std::ostream& operator<<(std::ostream& s, const bbm::bsdfsample<CONF>& ss)
36 {
37 return s << "(" << ss.direction << ", " << ss.pdf << ", " << ss.flag << ")";
38 }
39
40} // end bbm namespace
41
42#endif /* _BBM_BSDFSAMPLE_H_ */
All BBM methods are defined to operate on a variety of value types and spectrum types....
Definition: aggregatebsdf.h:29
std::ostream & operator<<(std::ostream &s, const BSDF &bsdf)
Definition: bsdf_base.h:138
Structure to hold a sample's direction and PDF.
Definition: bsdfsample.h:21
BBM_IMPORT_CONFIG(CONF)
BBM_ATTRIBUTES(direction, pdf, flag)
Vec3d direction
Sampled direction.
Definition: bsdfsample.h:24
BsdfFlag flag
Type of sample.
Definition: bsdfsample.h:26
Value pdf
Pdf of the sampled direction.
Definition: bsdfsample.h:25
Compile-time reflection of: