Loading...
Searching...
No Matches
backbone.h
Go to the documentation of this file.
1#ifndef _BBM_ENOKI_BACKBONE_H_
2#define _BBM_ENOKI_BACKBONE_H_
3
5
6#include "backbone/array.h"
7#include "backbone/vec.h"
8#include "backbone/color.h"
9#include "backbone/complex.h"
10#include "backbone/type_traits.h"
11#include "backbone/math.h"
12#include "backbone/horizontal.h"
13#include "backbone/control.h"
14#include "backbone/random.h"
15
16#ifdef ENOKI_AUTODIFF
17 #include "backbone/gradient.h"
18#endif /* ENOKI_AUTODIFF */
19
20#ifdef BBM_PYTHON
21 #include "enoki/python.h"
22#endif /* BBM_PYTHON */
23
24#include "backbone/stringconvert.h"
25
26/************************************************************************/
27/*! \file backbone.h
28
29 \brief Define the available configurations for the enoki backbone
30
31*************************************************************************/
32
33namespace bbm {
34
35 /*** Implementation detail ***/
36 namespace detail {
37 template<typename VALUE, string_literal NAME, typename CONF>
38 struct rgbConfig
39 {
40 static constexpr string_literal name = NAME;
41 using Config = CONF;
42 using Value = VALUE;
43 using Spectrum = backbone::color<Value>;
44 static Spectrum wavelength(void) { return {0.645, 0.526, 0.444}; } // in micron
45 };
46 }
47
48 /**********************************************************************/
49 /*! @{ \name Config with non-packet/non-diff floating point RGB colors
50 **********************************************************************/
51 struct floatRGB : public detail::rgbConfig<float, "floatRGB", floatRGB> {};
52 struct doubleRGB : public detail::rgbConfig<double, "doubleRGB", doubleRGB> {};
53 //! @}
54
55 /**********************************************************************/
56 /*! @{ \name Config with packet floating point RGB colors
57 **********************************************************************/
58 struct floatPacketRGB : public detail::rgbConfig<enoki::Packet<float>, "floatPacketRGB", floatPacketRGB> {};
59 struct doublePacketRGB : public detail::rgbConfig<enoki::Packet<double>, "doublePacketRGB", doublePacketRGB> {};
60 //! @}
61
62#ifdef ENOKI_AUTODIFF
63 /**********************************************************************/
64 /*! @{ \name Config with differentiable floating point RGB colors
65 **********************************************************************/
66 struct floatDiffRGB : public detail::rgbConfig<enoki::DiffArray<float>, "floatDiffArray", floatDiffRGB> {};
67 struct doubleDiffRGB : public detail::rgbConfig<enoki::DiffArray<double>, "doubleDiffArray", doubleDiffRGB> {};
68 //! @}
69#endif /* ENOKI_AUTODIFF */
70
71} // end bbm backbone
72
73
74#endif /* _BBM_ENOKI_BACKBONE_H_ */
75
drjit::Array< T, 3 > color
Definition: color.h:13
Definition: aggregatebsdf.h:29
Definition: backbone.h:59
Definition: backbone.h:58